file_put_contents in php

file_put_contents is the built-in function in PHP, which is the most helpful functions to handle files in PHP.file_put_contents () function is used to write a string to a file.

Here is the syntax of file_put_contents in php

file_put_contents($FILE, $DATA)

$FILE: The file on which you want to write.
$DATA: The Content that has to be written on the specified file.

Return Value : it returns the number of bytes that were written on the specified file 

Here is the example of file_put_contents in php

echo file_put_contents("hello.txt", "file_put_contents PHP tutorials");

My Thought

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

Our Tool : hike percentage calculator