一個目錄遍歷函數
function dirtree($path="./test") {
echo "
";
$d = dir($pathpath);
!== ($v = $d->read())) {
if($v == "."
$v == "..")
continue;
$ file = $d->path."/".$v;
echo "- $v";
if(is_dir($file))
dirtree($file);
dirtree($file); }
$d->close();
echo "
";
}
dirtree();
?>
dirtree();
?>
http://www.bkjia.com/PHPjc/314378.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/314378.htmlTechArticle
一個目錄遍歷函數?php function dirtree($path="./test") { echo "dl"; $d = dir($path); while(false !== ($v = $d-read())) { if($v == "." $v == "..") continue; $file = $d-path."...