Searching for all directories that do NOT contain a specified file

Hey, reddit, I’m currently working on a web project that is apparently a little beyond my knowledge. I need to come up with a php function that will recursively scan all subdirectories on a server and find all of the subdirectories that do NOT contain a file named “index.php”. I then need to output the list of the qualifying directories into an array or a text file. Any help would be much appreciated.

Sponsor our Newsletter | Privacy Policy | Terms of Service