Re: Newbie attempting file open...
| From: | Thomas Smart | Date: | Tue, 11 Mar 2003 01:48:53 +0000 |
| Subject: | Re: Newbie attempting file open... | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-18959@lists.php.net to get a copy of this message | ||
try r+ instead of r
and if your working with a windows server add b after the r+
"William Fisher" <zfisherdrums@yahoo.com> wrote in message
news:20030310185407.92693.qmail@web20507.mail.yahoo.com...
>
> The Question: It is my understanding that fopen() using the "r" option
will either open the indicated file for read only OR create one if it
doesn't exist. fopen() is giving me this error when trying to create/open a
file.
>
> Warning: fopen(c:/program files/apache group/apache/htdocs/test.txt)
[function.fopen]: failed to create stream: No such file or directory in
c:\program files\apache group\apache\htdocs\file_open.php on line 5
>
> The Code: What I've written...well...copied... is this:
>
> <?php
>
> $DOCUMENT_ROOT = $HTTP_SERVER_VARS['DOCUMENT_ROOT'];
>
> $fp = fopen("$DOCUMENT_ROOT/test.txt" , "r");
>
> ?>
>
>
> The Guts: Windows ME, Apache 1.3.27, PHP 4.3.1.
>
> Why am I using ME? Call it compulsary. I buy the cheap gas, too. Any ideas
as to why this is happening? What's this whole file streaming issue?
>
> Blessings,
>
> Zach Fisher....
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, and more