file_put_contents (string file[, boolean append], string contents1[, string contents2, string contents3, ..., string contentsN]) ⇒ string
Writes an infinite amount of parameters to a text file. You can append text on the end by inserting the boolean append before writing the file. Note, if you do choose to do this and wish to write a boolean true or false value to the file, the preferred option is that you should use file_write("filename.txt", "", true) as the second parameter will not be recognised as append boolean.
Notes
If you choose to do append and wish to write a boolean true
or false
value to the file, the suggestion is that you should use
file_put_contents("filename.txt", "", true)
as the second parameter will not be recognised as append boolean this way.
Prior to version 1.7.6 this method was called file_write
. It was renamed as
the file_write
method was removed.