在一个目录中列出所有文件PHP [重复] - List all files in one directory PHP [duplicate]

问题:

This question already has an answer here: 这个问题已经在这里有了答案:

What would be the best way to list all the files in one directory with PHP? 用PHP在一个目录中列出所有文件的最佳方法是什么? Is there a $_SERVER function to do this? 是否有$ _SERVER函数可以执行此操作? I would like to list all the files in the usernames/ directory and loop over that result with a link, so that I can just click the hyperlink of the filename to get there. 我想列出usernames /目录中的所有文件,并通过链接遍历该结果,以便我可以单击文件名的超链接到达那里。 Thanks! 谢谢!


解决方案:

参考一: https://stackoom.com/question/14Bi9
参考二: List all files in one directory PHP [duplicate]
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章