Re: fopen

From: Date: Mon, 29 Dec 2003 15:37:55 +0000
Subject: Re: fopen
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-173427@lists.php.net to get a copy of this message
On Monday 29 December 2003 09:50 am, Cesar Aracena wrote: > Now it gives me the following error message: > > Warning: fopen(websitename/esp/files/welcome.txt): failed to open stream: > No such file or directory in d:\wwwroot\websitename\esp\lib\functions.php > on line 6 > > But the file exists and so does the folder it is into. What can be wrong? I > also uploaded the file to my Unix web server for testing purposes, CHMOD > the folder to 777 and linked to the file but then other error appeared. > When I tried with "rb" for fopen it gave me the same error saying that the > file was missing... ??? > > Thanks, > I cant say why you may be experiencing this error. The only thing wrong with your original code was you were trying to read a file, with fopen in append mode which is wrong. Maybe start with reading files that live in the same directory as the calling script, and work your way out from there...

« previous php.general (#173427) next »