我需要执行以下Linux find命令如何使用PHP来搜索文件(需要为Linux找到替代方式)
find /home/*/mail/ -type d -name ".test" > tmp_file
但使用PHP(因为在某些操作系统下的某些原因冻结find命令)。 如何使用php进行搜索并将结果放入tmp_file中?
谢谢
我需要执行以下Linux find命令如何使用PHP来搜索文件(需要为Linux找到替代方式)
find /home/*/mail/ -type d -name ".test" > tmp_file
但使用PHP(因为在某些操作系统下的某些原因冻结find命令)。 如何使用php进行搜索并将结果放入tmp_file中?
谢谢
您可以随时使用FilesystemIterator
,DirectoryIterator
可以使用水珠功能。