how do i can deny access for a directory in php? so that the code below won't work?
$handle=opendir('c:\WINNT'); while ($file = readdir ($handle)) { if ($file != "." && $file != "..") { echo "$file\n"; } } closedir($handle);
😕
Hmm... you may want to use .htaccess for securing a directory. Take a look here http://httpd.apache.org/docs/howto/htaccess.html
The way you are opening the file accessing C: you can't secure it. htaccess will work if you want to try to open it url style.
ANSWER : NTFS
NB : If you run apache as a service you have to concider that restricting the access has to keep the SYSTEM session out in NTFS and NOT the current user. The NTFS user priviledges grants declaration are user dependant, keep that in mind.