一个目录遍历函数 <?php
function dirtree($path=”./test”) {
echo “
- “;
- $v”;
if(is_dir($file))
dirtree($file);
}
$d->close();
echo “
$d = dir($path);
while(false !== ($v = $d->read())) {
if($v == “.”
$v == “..”)
continue;
$file = $d->path.”/”.$v;
echo “
“;
}
dirtree();
?>
以上就是一个目录遍历函数的详细内容,更多请关注来源gaodaima#com搞(代@码网gaodaima搞代码网其它相关文章!