PHP技术那点事
全部
技术
PHP
MySQL
前端
Linux
JAVA
退出
编辑文章
选择分类
PHP
MySQL
前端
Linux
Java
工具
选择专栏
设计模式
java基础
Angular学习
Java面试题
描述:
封面图上传 :
+
点击上传图片
```php function get_dir_info($path){ $handle = opendir($path);//打开目录返回句柄 while(($content = readdir($handle))!== false){ $new_dir = $path . DIRECTORY_SEPARATOR . $content; if($content == '..' || $content == '.'){ continue; } if(is_dir($new_dir)){ echo "
目录:".$new_dir . '
'; get_dir_info($new_dir); }else{ echo "文件:".$path.':'.$content .'
'; } } } get_dir_info($dir); ```
保存文章