RE: [PHP] Problem with fopen() when php is in safe_mode

From: Date: Thu, 01 Nov 2001 16:09:47 +0000
Subject: RE: [PHP] Problem with fopen() when php is in safe_mode
Groups: php.general 
Request: Send a blank email to php-general+get-73164@lists.php.net to get a copy of this message
> -----Original Message----- > From: Daniel Bergqvist [mailto:daniel@slashx.se] > Sent: Thursday, November 01, 2001 9:57 AM > To: php-general@lists.php.net > Subject: [PHP] Problem with fopen() when php is in safe_mode > > > if($dir = @opendir("/home/d5051/public_html/test")){ You're getting filenames from /home/d5051/public_html/test > $fd = fopen($file,"r"); > [snip] > > Warning: fopen("testar.txt","r") - No such file or directory in > /home/d5051/public_html/mail.php on line 17 But your script is apparently running in /home/d5051/public_html And trying to open the file in that same directory. Try changing the fopen line to $fd = fopen("test/$file","r"); Or $fd = fopen("/home/d5051/public_html/test/$file","r"); --- Mark Roedel | "The most overlooked advantage to owning a Systems Programmer | computer is that if they foul up there's no LeTourneau University | law against whacking them around a little." Longview, Texas, USA | -- Owen Porterfield

« previous php.general (#73164) next »