About comment @08-Mar-2005 02:22, the proposed function is not compatible with PHP5 file_put_contents( ) :
- Nothing about array
- Nor about flags and constants
- Fatal error instead of warning
- fopen( ) mods 'a+' or 'w+' are unuseful for a writting function
- Returns nothing *instead of* FALSE or length written
=> Avoid this function.
If you don't want to install PEAR, just download the PHP_Compat package and copy/past the function file_put_contents( ) given.
http://pear.php.net/package/PHP_Compat
file_get_contents