# function showDirectoryFile($path){ # $dh = opendir($path); # while($file = readdir($dh)){ # if($file=="."||$file=="..") # continue; # $subFilePath = $path.DIRECTORY_SEPARATOR.$file; # if(is_dir($subFilePath)){ # echo "文件夹:".$subFilePath.""; # showDirectoryFile($subFilePath); # } # if(is_file($subFilePath)) # echo "文件:".$subFilePath.""; # } # echo "$file "; # closedir($dh); # } # showDirectoryFile("php");