兄弟在做项目时,遇到了一个难题!高手帮忙了! http://community.csdn.net/Expert/topic/3451/3451358.xml?temp=.620495其中的:loopDir($root,$filter=null)方法便是做此用途 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?phpfunction test($path) { while (false !== ($entry = $d->read())) { if("." != $entry && ".." != $entry) { if(is_dir($path.$entry) && !is_link($path.$entry)) { test($path.$entry); }else{ echo "文件:".$path.$entry."<br>\n";//这里你自己改改 } } } $d->close();}test("/dirA/");?> <?phpfunction test($path) { while (false !== ($entry = $d->read())) { if("." != $entry && ".." != $entry) { if(is_dir($path.$entry) && !is_link($path.$entry)) { echo("目录:".$path.$entry."<br>\n"); test($path.$entry); }else{ echo "文件:".$path.$entry."<br>\n";//这里你自己改改 } } } $d->close();}test("/dirA/");?> 建议看看php的帮助文档中的目录函数库 php中查询最近一个月的查询代码报错,请问咋办 数据先写入Memcache,然后异步吸入DB,这个操作怎么弄的? dotnet的18位时间戳如何转换成unix10位时间戳 Javascript 请教高手正则表达式问题? 求一些好的毕业设计题目 如何防止刷新来增加访问数量 问:PHP里怎么将值记录进cookies数组里? 一个二进制转十进制的问题? 问个利用 PHP 采集脚本取值问题。。。 高分求一在线咨询程序源码 求助.用discuz的cookie共享问题
function test($path) { while (false !== ($entry = $d->read())) { if("." != $entry && ".." != $entry) {
if(is_dir($path.$entry) && !is_link($path.$entry)) { test($path.$entry); }else{ echo "文件:".$path.$entry."<br>\n";//这里你自己改改 }
} } $d->close();
}
test("/dirA/");
?>
function test($path) { while (false !== ($entry = $d->read())) { if("." != $entry && ".." != $entry) {
if(is_dir($path.$entry) && !is_link($path.$entry)) {
echo("目录:".$path.$entry."<br>\n");
test($path.$entry); }else{ echo "文件:".$path.$entry."<br>\n";//这里你自己改改 }
} } $d->close();
}
test("/dirA/");
?>