list files php from - create json file

前端 未结 2 647
情话喂你
情话喂你 2021-01-24 10:55

I want to create a php script that loads all my files (.pdf) from the 3 directory and create a json file.

I try this

$dir_2016 = \"./HCL/2016\";
$dir_201         


        
2条回答
  •  日久生厌
    2021-01-24 11:21

    Building on my comment above, here's a cheap way to get only pdf-filenames in the given directories:

    Note that there's a multitude of other ways of how to get all files in a directory, so this is by no means the only solution.

提交回复
热议问题