Hi,
I am trying to open a directory using opendir() function. It is not opening any directory. My configuration is:
PHP: 4.3.3
Apache: 1.3.29
OS: Windows 2000 server
Here is my code:
$dir = "/img/";
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
echo "filename: $file : filetype: " . filetype($dir . $file) . "\n";
}
closedir($dh);
}
}
else echo "Not a valid Dir";
The above code gives me "Not a valid Dir" as output.
Thanks in advance. I really need this one asap.