PHP - Code to traverse a directory and get all the files(images)

前端 未结 10 1807
被撕碎了的回忆
被撕碎了的回忆 2021-01-27 13:00

i want to write a page that will traverse a specified directory.... and get all the files in that directory...

in my case the directory will only contain images and dis

10条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-27 13:25

    You could as others have suggested check every file in the dir, or you could use glob to identify files based on extension.

提交回复
热议问题