; }else{ echo 'err'; } } }}$dir = d:/yourdir/;scan_all($dir);
复制代码
方法2,directoryiterator:
isdot()) { if($fileinfo->isdir()) { echo $fileinfo.'=>'; directoryiterator($path.directory_separator.$fileinfo); echo ''; } else { echo $fileinfo->getfilename().'
'; } } }}$dir = d:/yourdir/;directoryiterator($dir);
复制代码