/**
*获取指定目录下的所有文件包括子目录中的文件
*/
function getAllFiles($path)
{
//判断是否是目录
if(is_dir($path))
{
if ( $handle = opendir ($path ))
{
while ( false !== ( $file = readdir ( $handle )))
{
if ( $file != "." && $file != ".." )
{
$this->getAllFiles($path."/".$file);
}
}
closedir ( $handle );
}
}
//判断是否是正常文件
if(is_file($path))
{
echo " $path ".":".md5_file ( $path )."</br>" ;
}
}
PHP获取目录下的文件(包括子目录中的文件)
最新推荐文章于 2023-05-21 17:48:27 发布