遍历文件夹中的文件:
1 $handle = opendir($folder_path); 2 while (false !== ($filename = readdir($handle))){ 3 $files[] = $filename; 4 } 5 closedir($handle); 6 var_dump($files);