时时商务社区

标题: 一个目录遍历函数 [打印本页]

作者: 新格网络    时间: 2018-2-14 09:46

                                                           
                        
一个目录遍历函数
";
  $d = dir($path);
  while(false !== ($v = $d->read())) {
    if($v == "."
$v == "..")
      continue;
    $file = $d->path."/".$v;
    echo "$v";
    if(is_dir($file))
      dirtree($file);
  }
  $d->close();
  echo "";
}
dirtree();
?>
                    
                     
            
            
        




欢迎光临 时时商务社区 (http://bbs.4435.cn/) Powered by Discuz! X3.2