一个简单的小程序
<?php
function showDirectoryFile($path){
$handle = opendir($path);
while($file = readdir($handle)){
if($file=="."||$file=="..")
continue;
$newFilePath = $path.DIRECTORY_SEPARATOR.$file;
if(is_dir($newFilePath)){
echo "文件夹:".$newFilePath."<br>";
showDirectoryFile($newFilePath);
}
if(is_file($newFilePath))
echo "文件:".$newFilePath."<br>";
}
closedir($handle);
}
showDirectoryFile("myphp");
?>
帮助学习文件系统
对php操作文件有所帮助
只是也许
呵呵....