[PATCH] New function file_put_contents()
| From: | Christian Schneider | Date: | Fri, 22 Nov 2002 15:02:00 +0000 |
| Subject: | [PATCH] New function file_put_contents() | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-91456@lists.php.net to get a copy of this message | ||
Ok, I try again to submit the patch and a test script for it :-)
Prototype:
int file_put_contents(string filename, mixed data [, string mode])
It takes a filename (URL wrappers supported), the data to be written and
a mode for the file. The data can be either a string or an array (which
is like using join("", $data) first and can be used to write data read
by the file() function). The mode can be "a" or "ab" to append to a file
and defaults to "wb". The function returns the number of bytes written
to the stream.
- Chris