What is the purpose of the file_put_contents() function in PHP?

  • To write data to a file
  • To read data from a file
  • To delete a file
  • To rename a file
The file_put_contents() function in PHP is used to write data to a file. It takes the file name and the data to be written as parameters and writes the data to the specified file. This function is a convenient way to write data to a file without explicitly opening and closing the file handles. Learn more: http://php.net/manual/en/function.file-put-contents.php
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *