Re: Opening Files via PHP

From: Date: Thu, 23 Oct 2003 08:27:09 +0000
Subject: Re: Opening Files via PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-167240@lists.php.net to get a copy of this message
Stephen Tiano wrote:
And the code the book uses to write to this file is: // open file for appending
     $fp = fopen("$DOCUMENT_ROOT/../orders/orders.txt", 'a');
This is what is in the book, you need to change the path to suit your setup. Or move the file, it seems moving ./orders/ directory one directory up should solve your problem.
    Unfortunately, my browser--Netscape 7.02--gives the following in response to that code:
      Warning: fopen(/Library/WebServer/Documents/../orders/orders.txt) [function.fopen]: failed to
create stream: No such file or directory in /Users/stephent/Sites/php_mysql_web_dev/chapter_02/processorder.php on line 63


« previous php.general (#167240) next »