「code」というフォルダディレクトリ名を作ってみたのですが、「status.txt」に保存したいです。
これは、予期しない T_CONSTANT_ENCAPSED_STRING を受け取った私のコードの問題です。
if(is_writeable($newdir . "/status.txt")) {
if (fwrite($statusTxt, $statusCode . "," . $status . "," . $share . "," . $date . "," . $permission "\n")){
}
ディレクトリを作成して status.txt に保存する方法は正しいですか? 以下は残りのコードです。
どうもありがとうございました。助けてくれてありがとう。
$newdir = "../../data/code";
umask(0007);
if(!file_exists($newdir))
{
mkdir($newdir, 02770);
$statusTxt = fopen($newdir. "/status.txt", "a");
}
if(is_writeable($newdir . "/status.txt")) {
if (fwrite($statusTxt, $statusCode . "," . $status . "," . $share . "," . $date . "," . $permission "\n")){
}
echo "<p>Your form has succesfully been submit!</p>";
}
fclose($statusTxt);
}