Re: Question about fopen()
| From: | David Robley | Date: | Tue, 05 Mar 2002 02:28:39 +0000 |
| Subject: | Re: Question about fopen() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-87211@lists.php.net to get a copy of this message | ||
In article <20020304153927.47855.qmail@pb1.pair.com>,
smaction@slightlysuspect.com says...
> Hi,
>
> Does fopen() work similar to open in CGI ?
?? CGI ?? Some new language?
> If the file doesn't exist will
> it create it?
Depends on the parameters you feed to fopen for 'mode'; w, w+, a and a+
will attempt to create the file if it doesn't exist.
> What is the best way to test if the file was created?
Check the return value from fopen; it will be false if the attempt
failed. See the manual for more detail.
--
David Robley
Temporary Kiwi!
Quod subigo farinam