。。
代码
function file_list ( $path )
{
if ( $handle = opendir ( $path ))
{
while ( false !== ( $file = readdir ( $handle )))
{
& nbsp; if ( $file != "." && $file != ".." )
&nbs p; {
& nbsp; if ( is_dir ( $path . "/" . $file ))
&nbs p; {
& nbsp; echo $path . " : " . $file . " <br> " ; //去掉此行显示的是所有的非目录文件
&nbs p; file_list ( $path . "/" . $file ) ;
& nbsp; } else
&nbs p; {
& nbsp; echo $path . " : " . $file . " <br> " ;
&nbs p; }
& nbsp; }
}
}
}
{
if ( $handle = opendir ( $path ))
{
while ( false !== ( $file = readdir ( $handle )))
{
& nbsp; if ( $file != "." && $file != ".." )
&nbs p; {
& nbsp; if ( is_dir ( $path . "/" . $file ))
&nbs p; {
& nbsp; echo $path . " : " . $file . " <br> " ; //去掉此行显示的是所有的非目录文件
&nbs p; file_list ( $path . "/" . $file ) ;
& nbsp; } else
&nbs p; {
& nbsp; echo $path . " : " . $file . " <br> " ;
&nbs p; }
& nbsp; }
}
}
}
。。