Re: fwrite????
| From: | Anton Stroganov | Date: | Mon, 20 Aug 2001 18:14:50 +0000 |
| Subject: | Re: fwrite???? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-63547@lists.php.net to get a copy of this message | ||
when you open the file with fopen(), use the 'a' (writing only) or 'a+'
(reading and writing) arguments
ie:
int fopen ("somefile.txt", "a");
"...
* 'a' - Open for writing only; place the file pointer at the end of the
file.
If the file does not exist, attempt to create it.
* 'a+' - Open for reading and writing; place the file pointer at the end
of the file. If the file does not exist, attempt to create it.
..."
info from
http://www.php.net/manual/en/function.fopen.php
----- Original Message -----
From: Brian C. Doyle <bcdoyle@mindspring.com>
To: <php-general@lists.php.net>
Sent: Monday, August 20, 2001 11:06
Subject: [PHP] fwrite????
> Hello all,
>
> Is is possible to just append to the end of a file using
> fwrite??? Currently I am reading the contents for the file into an array
> then add to the array what I want and rewrite the file from the array...
> And well that is just silly... How else would I do this??
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>