permissions? problem
Posted: Mon Mar 07, 2005 5:24 pm
I realize this might not even be a coding problem. I'm actually hoping it is. I'm getting an error "failed to open stream: Permission denied in....."
I'm using winxp professional. the file is read-only. as are all the files on the site. i turned off simple file-sharing and messed with the permissions, but am still having the problem.
i've been testing on a local machine. i have tried it on a shared host without problem. is it possible it could be a php.ini thing or apache setup?
I'm using winxp professional. the file is read-only. as are all the files on the site. i turned off simple file-sharing and messed with the permissions, but am still having the problem.
i've been testing on a local machine. i have tried it on a shared host without problem. is it possible it could be a php.ini thing or apache setup?
Code: Select all
<?php
$dir = opendir("../../month/reports/");
while ($result = readdir($dir)) {
if ($result != "." && $result != "..") {
print '<b>' . $result . '</b><br>';
}
$fp = fopen("../../month/reports/" . $result, 'r') or die ("Could not open file");
while ( ! feof($fp) ) {
$line = fgets( $fp, 2048);
}
}
?>