在一個目錄中列出所有文件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]
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章