PHP: How to populate a directory structure in an array

前端 未结 4 949
Happy的楠姐
Happy的楠姐 2021-01-06 05:43

I am developing an admin panel that shows the directory structure of a specific location on server. I have got a recursive php function that iterates through every file and

4条回答
  •  [愿得一人]
    2021-01-06 06:08

    I've made a gist of a build tree class. It uses RecursiveDirectoryIterator and produce an array or a JSON for ajax purpose.

    Here it is: https://gist.github.com/jonataswalker/3c0c6b26eabb2e36bc90

提交回复
热议问题