PHP/filt_put_contents()

解説 文字列をファイルに書き込む
sample1
Hello World
sample1code
$s1Str = "Hello World";
file_put_contents("php.txt", $s1Str);
$s1File = file_get_contents("php.txt");
echo $s1File;