标签:
function zx($dir){ if(is_dir($dir)){ $filesnames = scandir($dir); foreach ($filesnames as $name) { if($name!=‘.‘&&$name!=‘..‘){ echo $name; } if($name!=‘.‘&&$name!=‘..‘){ if(is_dir($name)){ zx($name); }else{ echo ‘这是文件‘; } } echo ‘<br>‘; } } } zx("C:\wamp\www\zx");
标签:
原文地址:http://www.cnblogs.com/zx-admin/p/5388029.html