Source Code:
(back to article)
<?php $data = "This is the first line." . PHP_EOL . "This is the second line."; file_put_contents("example.txt", $data); $contents = file_get_contents("example.txt"); echo $contents;
Result:
Report an issue