I\'m trying to return the files in a specified directory using a recursive search. I successfully achieved this, however I want to add a few lines of code that will allow me
Try this, it uses an array of allowed file types and only echos out the file if the file extension exists within the array.
\n"; } } ?>
You may also find that you could pass an array of allowed file types to your RecursiveDirectoryIterator class and only return files that match.
RecursiveDirectoryIterator