Hi all,
I'm having a problem with opendir() that I just cannot figure out.
Here's what I'm having problems with:
$galleryDir = "images/projects";
$dh = opendir($galleryDir) or die("Unable to open main gallery directory for reading.");
while($dir = readdir($dh)) {
//..........
}
Regardless of what I set $galleryDir to, PHP opens the directory the script resides in. The path in $galleryDir above is relative to the script's location.
I've tried using absolute paths, different paths, chdir(), placing the string within the opendir() function rather than the variable, and all I get is the contents of the directory in which the script resides.
I am completely baffled by this one, any help would be greatly appreciated.
FYI:
OS: Windows XP Pro
XAMPP for Windows Version 1.6.6 which has:
PHP: 5.2.5
Apache: 2.2.8