Check if directory have sub-directories PHP -


i trying file in directory. operation must fast.the inital directory can have childrens path/child/sub_child/sub_sub_child/afile. file can present before

  • path

    • child
    • a file

    i not care file getting want fast way it.

i stuck this

        $h = opendir($path); //open current directory         while (false !== ($entry = readdir($h)))          {             if($entry != '.' && $entry != '..')              {                  echo $entry;                  break;              }         } 


Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -