$s1Str = "Hello World"; file_put_contents("php.txt", $s1Str); $s1File = file_get_contents("php.txt"); echo $s1File;