Ai
2 Star 4 Fork 2

PHP项目/php接口文档

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
DocScanner.php 895 Bytes
一键复制 编辑 原始数据 按行查看 历史
blowsnow 提交于 2021-04-22 17:09 +08:00 . 'init'
<?php
namespace doc;
/**
* @package doc
* @author blowsnow
* @createdate 2020/9/8 15:47
* @describe
*/
class DocScanner
{
//扫描目录列表
public static function scan($dir)
{
$files = [];
if (is_array($dir)){
foreach ($dir as $item){
array_push($files,...self::_scan($item));
}
}else{
$files = self::_scan($dir);
}
return $files;
}
public static function _scan($dir){
$files=array();
$dir_list = scandir($dir);
foreach($dir_list as $file){
if($file!='..' && $file!='.'){
if(is_dir($dir.'/'.$file)){
array_push($files,...self::_scan($dir.'/'.$file . '/'));
}else{
$files[] = $dir . $file;
}
}
}
return $files;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/my-php-project/php-interface-document.git
git@gitee.com:my-php-project/php-interface-document.git
my-php-project
php-interface-document
php接口文档
v2

搜索帮助