file_put_contents($filename, $content); // which is identical to calling fopen(), fwrite(), and fclose() successively to write data to a file.