Write a string to a file in PHP
Description
The following code shows how to write a string to a file.
Example
<?php
echo file_put_contents("test.txt","Hello World. Testing!");
?>
The code above generates the following result.
The following code shows how to write a string to a file.
<?php
echo file_put_contents("test.txt","Hello World. Testing!");
?>
The code above generates the following result.