PHP count total files in directory AND subdirectory function

后端 未结 6 553
小蘑菇
小蘑菇 2021-01-18 22:36

I need to get a total count of JPG files within a specified directory, including ALL it\'s subdirectories. No sub-sub directories.

Structure looks like this :

<
6条回答
  •  深忆病人
    2021-01-18 23:07

    The answer by Developer is actually brilliant! Use it like this to make it work:

    System("find . -type f -print | wc -l");

提交回复
热议问题