function AllFile($dir){
if($dh = opendir($dir)){
while (($file = readdir($dh)) !== false){
if($file !='..' && $file !='.'){
if(is_dir($dir.'/'.$file)){
AllFile($dir.'/'.$file); //如果判断还是文件,则递归
}else{
echo $file; //输出文件名
}
}
}
}
}
特别声明:文章多为网络转载,资源使用一般不提供任何帮助,特殊资源除外,如有侵权请联系!
相关推荐
评论 (0)