Re: file_put_contents() / file_add_contents() ?
| From: | Ilia A. | Date: | Fri, 21 Feb 2003 14:18:32 +0000 |
| Subject: | Re: file_put_contents() / file_add_contents() ? | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-94434@lists.php.net to get a copy of this message | ||
On February 21, 2003 04:54 am, Wez Furlong wrote:
> Look in the archives for that guys original patch; it allowed doing
> something like this:
>
> $foo = array();
>
> $foo[] = "some text";
> $foo[] = "more text";
>
> file_put_contents("file.txt", $foo);
>
> and also:
>
> file_put_contents("file.txt", $foo, $bar, $baz);
I do see the advantage of allowing an array to be passed to allow the function
to work as a reverse version of file(), however I am not certain about the
usefulness of allowing passage of unlimited number of variables containing
the strings to write.
Ilia