int file_put_contents ( string $filename , mixed $data [, int $flags = 0 [, resource $context ]] )
This function is identical to calling fopen(), fwrite() and fclose() successively to write data to a file. If filename does not exist, the file is created. Otherwise, the existing file is overwritten, unless the FILE_APPEND flag is set.
The function returns the number of bytes that were written to the file, or FALSE on failure. Warning: This function may return Boolean FALSE, but may also return a non-Boolean value which evaluates to FALSE, such as 0 or "". Please read the section on Booleans for more information. Use the === operator for testing the return value of this function.