一个目录遍历函数<?php
function dirtree($path=”./test”) {
echo “
- “;
- $v”;
if(is_dir($file))
dirtree($file);
本文来源gaodai#ma#com搞@@代~&码*网/搞gaodaima代码}
$d->close();
echo “
$d = dir($path);
while(false !== ($v = $d->read())) {
if($v == “.”
$v == “..”)
continue;
$file = $d->path.”/”.$v;
echo “
“;
}
dirtree();
?>