作者yorjing (托儿所婴儿)
看板PHP
标题[请益] 关於开某个资料夹下的资料夹里的档案?
时间Mon Dec 17 22:33:02 2007
<?php
$handle=opendir('.');
echo "Directory handle: $handle\n";
echo "Files:\n";
while ($file = readdir($handle)) {
if(is_dir($file))
{
if($file!="Thumns.db"){
if(substr($file,0,1)!=".")
{
echo "<br>资料夹:".$file;
while ($innerfile = readdir(opendir(".\\".$file))) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
我猜大概是这行的问题吧....
请问大大 这行要怎麽写比较好?
if(substr($file,0,1)!="."){
if($innerfile!="Thumns.db"){
echo "<br>档案:".$innerfile;
}
}
}
}
}
}
}
closedir($handle);
?>
这是我的程式码
我想把某资料夹的所有资料夹里的所有档案
档名跟资料夹名称列出来
不料却无线回圈
可以请问各位大大有办法解决吗?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.217.236.54
※ 编辑: yorjing 来自: 61.217.236.54 (12/17 22:34)
※ 编辑: yorjing 来自: 61.217.236.54 (12/17 22:37)
1F:推 pakker:一直重新open当然一直重头读起阿 12/17 22:38
2F:→ yorjing:谢谢大大指点 12/17 22:41