From the manpage:file_put_contents($file, $data, FILE_APPEND|LOCK_EX)
This function is identical to calling fopen(3), fwrite(3) and fclose(3) successively to write data to a file.
And of course, add the LOCK_EX only if you care about not corrupting your logfiles!
Enjoy! :)
No comments:
Post a Comment