`file_put_contents()` is a PHP function which writes a string to a file.
file_put_contents()
is a PHP function, introduced in PHP 5.1.0, which writes a string to a file. It was added as a shortcut and calling this function is identical to calling fopen()
, fwrite()
, and fclose()
successively to write data to a file.
If the file attempting to be written to does not exist, the default behavior of the function is to create the file.
For more information on this function, please see the PHP manual: https://php.net/manual/en/function.file-put-contents.php