当前位置:网站首页>It can traverse all files and subfolders under a folder
It can traverse all files and subfolders under a folder
2022-07-28 09:53:00 【MountainYanYL】
// Use recursion to achieve , About what is recursion , Self search
public static function my_scandir($dir){
$files = array();
if(is_dir($dir)){
if($handle =opendir($dir)){
while (($file = readdir($handle))!== false){
if($file != '.' && $file!='..'){
$_dir = $dir ."/".$file;
if(is_dir($_dir)){
$files[$file] = self::my_scandir($_dir);
}else{
$files[] = $_dir;
}
}
}
closedir($handle);
return $files;
}
}
}
边栏推荐
- 高温持续,公交企业开展安全专项培训
- Opencv installation configuration test
- Software testing and quality learning notes 2 - black box testing
- Experiment 5: user and user group management
- The high temperature continues, and public transport enterprises carry out special safety training
- How to learn so many conceptual things in database? Seeking method
- 使用IdentityServer出现过SameSite Cookie这个问题吗?
- 数据库高级技术学习笔记1--Oracle部署和PL/SQL综述
- ES6新特性
- fastjson中@jsonType注解的功能简介说明
猜你喜欢

MySQL中各类型文件详解

This wechat plug-in is very easy to use

WPF布局之控件随着窗口等比放大缩小,适应多分辨率满屏填充应用

MQ learning

软件测试与质量学习笔记1---黑盒测试

Seeing clearly is more important than walking fast, because you can go far only when you walk right

The secret behind three salary increases a year

Business visualization - make your flowchart'run'(4. Actual business scenario test)
Edge团队详解如何通过磁盘缓存压缩技术提升综合性能体验

时序分析41 - 时序预测 TBATS模型
随机推荐
Window源码解析(一):与DecorView的那些事
分支与循环(1)
Domain events and integration events are not so big
PHP 基础
Analysis of the internal principle of LinkedList
Word segmentation results of ES query index fields
Some problems about CLR GC tuning
How to learn so many conceptual things in database? Seeking method
总线相关概念集合
Method parameter transfer mechanism of C #
超级原始人系列盲盒即将上线,PlatoFarm赋能超多权益
Arouter source code analysis (II)
路由器固件解密思路
LeetCode - 哈希表专题
SD卡介绍(基于SPEC3.0)
Database advanced learning notes -- storage functions
C form application uses object binding DataGridView data binding
手机号,固话正则表达式
Create SSL certificate using OpenSSL
Database core system