I need to put the correct path in the opendir() function. When I look the directory up on the server, it says:
/ www / images / cardimages / (Current Folder)
So, I put that path in my opendir() code:
<?php
if ($handle = opendir("www/images/cardimages/")) {
echo "Directory handle: $handle\n";
echo "Files:\n";
/* This is the correct way to loop over the directory. */
while (false !== ($file = readdir($handle))) {
echo "$file\n";
}
closedir($handle);
}
?>
and I get this error:
Warning: opendir(www/images/cardimages/) [function.opendir]: failed to open dir: No such file or directory in /home/dexter/public_html/listpics.php on line 10
What should I put in the opendir() function???