<?php // Write a string to a file (creates it if missing) file_put_contents("notes.txt", "First line of text\n"); // Read the entire file back into a string $content = file_get_contents("notes.txt"); echo $content; ?>
Click Run to execute this code.