列出目录及其子目录中的所有文件

时间:2020-02-20 12:26:45

标签: php

我正在使用以下内容列出目录中的所有.jpg文件。除未列出任何子目录中的文件外,此方法确实运行良好。

如何访问子目录中的文件?

foreach (array_filter(glob('/home/account/public_html/images/uploads/gallery/*.jpg'), 'is_file') as $file)
{

}

0 个答案:

没有答案