当前位置:网站首页>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;
}
}
}
边栏推荐
- Window源码解析(四):Window的删除机制
- ASP.NET Core 6框架揭秘实例演示[29]:搭建文件服务器
- Symbolic operation of MATLAB
- LinkedList内部原理解析
- Plato Farm-以柏拉图为目标的农场元宇宙游戏
- Seeing clearly is more important than walking fast, because you can go far only when you walk right
- 高温持续,公交企业开展安全专项培训
- With frequent data leakage and deletion events, how should enterprises build a security defense line?
- PHP 获取接口的方式
- OSS direct upload rails service practice
猜你喜欢

MySQL中各类型文件详解

The secret behind three salary increases a year

The maximum recommended number of rows for MySQL is 2000W. Is it reliable?

C# 读写文件从用户态切到内核态,到底是个什么流程?

JS array is de duplicated, the ID is the same, and a value is added and merged
![ASP.NET Core 6框架揭秘实例演示[29]:搭建文件服务器](/img/90/40869d7c03f09010beb989af07e2f0.png)
ASP.NET Core 6框架揭秘实例演示[29]:搭建文件服务器

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

JS提升:实现flat平铺的底层原理

Translation recommendation | debugging bookkeeper protocol - unbounded ledger

设计一个支持百万用户的系统
随机推荐
SQL Server、MySQL主从搭建,EF Core读写分离代码实现
判断字符串是不是回文
多线程一定能优化程序性能吗?
Translation recommendation | debugging bookkeeper protocol - unbounded ledger
Plato Farm-以柏拉图为目标的农场元宇宙游戏
PHP7 中 ?? 与? :的区别
Buckle 376 swing sequence greedy
居家健康诊断时代下,Senzo打造增强侧向流测试产品
NTU Lin Xuantian's "machine learning cornerstone" problem solving and code implementation | [you deserve it]
Detailed explanation of various types of files in MySQL
ECCV 2022 | can be promoted without fine adjustment! Registration based anomaly detection framework for small samples
Source code analysis of view event distribution mechanism
PHP 获取接口的方式
关于CLR GC调优的一些问题
数据不会说谎,Plato Farm就是元宇宙龙头
TimeBasedRollingPolicy简介说明
With frequent data leakage and deletion events, how should enterprises build a security defense line?
SQL server, MySQL master-slave construction, EF core read-write separation code implementation
数据库高级技术学习笔记1--Oracle部署和PL/SQL综述
力扣376-摆动序列——贪心