【发布时间】:2011-01-02 03:17:05
【问题描述】:
我需要创建一个循环遍历子目录中的所有文件。你能帮我这样构造我的代码吗:
$main = "MainDirectory";
loop through sub-directories {
loop through filels in each sub-directory {
do something with each file
}
};
【问题讨论】:
-
您希望在循环完文件后如何处理这些文件?
-
这会帮助你,阅读用户贡献的笔记php.net/manual/en/function.scandir.php