Hi, I’m getting the same Invalid argument supplied for foreach() error as the user Pinkfoot.
it’s throwing up the error for this line of code…
// the below is very simple, it just finds all the files and folders within a
// specified directory.
if($directory){
$directory = rtrim($directory,'/') . '/';
}
foreach(glob($directory."*") as $f){
if(is_dir($f)){
Any ideas?
Other than that, awesome script!

Thanks for your feedback.
You may try a regex such as #error/# to hide the folder named “error” and its contents, while leaving “error.php” displaying in the results.