我试图创建文件夹目录名称“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);
}