error with opendir

Posted on 16th Feb 2014 by admin

when i do this

if ($handle = opendir($dir)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$files[$mone]=$file;
$mone++;
}
}
closedir($handle);
}


i got

pendir() [function.opendir]: Unable to access

[function.opendir]: failed to open dir: Permission denied in

why? i have chmod of 777 of all the files and folder in this folder
help please
thank

Other forums