标签:open echo 查看 handle 指定 span pat and copy
<?php header("content-type:text/html;charset=utf8"); set_time_limit(0); $dir = "d:\\"; function show ($dir){ $handle = @opendir($dir); echo "<ul>"; while($file = @readdir($handle)){ if($file == "."||$file == "..") continue; if(is_dir("$dir/$file")){ show("$dir/$file"); }else{ if(pathinfo("$dir/$file",PATHINFO_EXTENSION) == "pdf"){ // copy("$dir/$file","./pdf/$file"); echo "<li>".iconv(‘gbk‘,‘utf-8‘,$file)."</li>"; } } } echo "</ul>"; } show($dir);
标签:open echo 查看 handle 指定 span pat and copy
原文地址:http://www.cnblogs.com/Basu/p/8001404.html