试试这个
$path = array("./test");//文件夹名
foreach($path as $val){
$dir_handle = @opendir($val) or die("Unable to open $val");
echo "Directory Listing of $val
";
while ($file = readdir($dir_handle))
{
echo "";
}
closedir($dir_handle);
echo "
";
}
?>