<?
function dir_all ( $path )
{ $handler = opendir($path);
while (false!==($tmp = readdir($handler)))
{ if(is_dir( "$path/$tmp" ))
{
if ($tmp=="." || $tmp=="..")
continue;
echo $tmp."<br>\n";
dir_all ("$path/$tmp");
} else
{
echo $tmp ."<br>\n";
} }
}?>
function dir_all ( $path )
{ $handler = opendir($path);
while (false!==($tmp = readdir($handler)))
{ if(is_dir( "$path/$tmp" ))
{
if ($tmp=="." || $tmp=="..")
continue;
echo $tmp."<br>\n";
dir_all ("$path/$tmp");
} else
{
echo $tmp ."<br>\n";
} }
}?>
解决方案 »
- 帮忙取任意一个月的最后一天
- while ($row = mssql_fetch_object($result)) 不好用就是不好用,为神马,在线等大哥恢复
- 自学两年php新手的困惑。希望大家都来说说看?顺便散分(非技术性)
- php+mysql存储过程返回多个结果集处理
- 帮个忙,哈哈!
- 怎样解决在print中写php代码?
- 请教使用正则preg_match_all取得页面中的全部链接
- 最近我在用PHP开发一个电子商务网站,遇到不少问题,请问哪里有电子商务整站代码啊,参考一下
- 有关IIS+PHP的配置问题--请各位老师帮忙看一下哪不对!!
- 请教一下ajax高手我一窍不通js 这段代码怎么理解使用
- cookie真的这么不可信?
- 在php中,我想把服务器的很多图片做成一个压缩包,让客户下载,不知道有什么方法,能不能生成一个什么下载列表之类的东西,让客户来下载
function dir_all ( $path ) {
if ($handle = @opendir($dir)) {
while(false !== ($file = @readdir($handle))) {
if (@filetype($dir.$file) == "file") {
echo $file."<br>\n";
} else {
if ($file=="." || $file=="..")
continue;
echo $file."<br>\n";
dir_all ("$path/$file);
}
}
}
?>