可以用 scandir() 函数 例如: http://www.w3school.com.cn/php/func_directory_scandir.asp
转载于:https://www.cnblogs.com/lizhaoyao/p/5912307.html