Jump to content

Please help me with this error message failed to open stream: Permission denied


monteoma

Recommended Posts

Hi guys,

 

I'm developing a web application to read some files that are included in my intranet the problem is that all the time I'm getting the next error: "failed to open stream: Permission denied" and is impossible to read them. I'm using apache web server running on winxp and my php version is 5.3.0. I'm using to do that the next code:

 

<?php

 

$file = fopen("//servername/shared/TMPFiles/file.txt","r") or exit("Unable to open file!");

 

while(!feof($file))

{

echo fgets($file). "<br />";

}

 

//some code to be executed

 

fclose($file);

?>

 

In fact my text file called file.txt has permissions for reading and writing. Any suggestion to solve it?

 

Thanks in advanced!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.