标签:遍历目录php
$dirname = "./runtime"; function fordir($dirname){ $dir = opendir($dirname); readdir($dir); readdir($dir); while (false !== ($file = readdir($dir))){ $file = $dirname.‘/‘.$file; if (is_dir($file)) { echo "目录:{$file}<br>"; }else{ echo "文件:{$file}<br>"; } } closedir($dir); } fordir($dirname);
标签:遍历目录php
原文地址:http://haixin.blog.51cto.com/1528212/1557760