//遍历文件夹下面所有的文件
function my_scandir($dir)
{
$files = array();
if ($handle = opendir($dir)){
while (($files = readdir($handle)) !== false){
if ($files != "." && $files != "."){
$files[$files] = my_scandir($dir . "/" . $files);
} else {
$files[] = $files;
}
}
}
closedir($handle);
return $files;
}