php始めたばかり。某サイトみながら書きました。
更新するたび本文増えるよ。みんなで叶える物語ってことだよね?
<?php
$testfile = “fightdayo.php”;
$umisay =“ことりのすりおろしリンゴ入りヨーグルト美味しいです。”;
if (is_writable($testfile)){
} else {
echo “not writable!”;
exit;
}
$fp = fopen($testfile,”a”);
if (!$fp) {
echo “could not open!”;
exit;
}
if (write($fp,$umisay) === false) {
echo “could not write!”;
exit;
}
echo “success!”;
fclose($fp);
$testfile = “fightdayo.php”;
if (!$fp = open($testfile, “r”)) {
echo “could not open”;
exit;
}
$umisay = fread($fp,filesize($testfile));
var_dump($umisay);
fclose($fp);