I have 2 folders: /var/www/vhosts/mydomain.com/httpdocs/ and /var/www/vhosts/mydomain.com/httpdocs/duh/
Both folders have the EXACT same perms, group, owner, everything.
If I set $path to the first one, no problems, I echo a list of files with 'html' in the filename.
If I set $path to the second one, it dies on the opendir(). However, it works fine from the command line, just not the browser.
Any ideas?
Here's my very simple code:
<?php
$path = "/var/www/vhosts/mydomain.com/httpdocs/duh/";
$img_folder = opendir($path) or die("Unable to open $path");
while (false !== ($file = readdir($img_folder))){
if (eregi("html", $file)){
echo $file;
}
}
?>