Re: file_put_contents() / file_add_contents() ?
| From: | Sascha Schumann | Date: | Fri, 21 Feb 2003 10:03:48 +0000 |
| Subject: | Re: file_put_contents() / file_add_contents() ? | ||
| References: | 1 2 3 4 5 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-94427@lists.php.net to get a copy of this message | ||
On Fri, 21 Feb 2003, Derick Rethans wrote:
> On Fri, 21 Feb 2003, Sascha Schumann wrote:
>
> > > I'm not 100% sure if we want this feature, but perhaps it is worth
> > > revisiting that patch.
> >
> > Alternatively, I would suggest to teach the submitter of that
> > patch regarding fopen, fwrite, implode. He might have
> > overlooked those existing functions.
>
> I think a counterpart for file_get_contents in the form of a plain
> file_put_contents would be welcome.
Don't tell me that
<?php file_write_content('foobar.txt', 'foo!',
file_exists('foobar.txt'));
is better than
<?php
$fp = fopen("foobar.txt", "a");
fputs($fp, "foo");
- Sascha