receiving unexpected T_CONSTANT_ENCAPSED_STRING, Create Directory
<p>I tried to create folder directory name "code", and I want to save it to "status.txt".</p>

<p>This is my code problem with received the  unexpected T_CONSTANT_ENCAPSED_STRING.</p>

<pre><code>if(is_writeable($newdir . "/status.txt")) {
    if (fwrite($statusTxt, $statusCode . "," . $status . "," . $share . "," . $date . "," . $permission "\n")){
}
</code></pre>

<p>Is this way is correct to create a directory and save it to status.txt?
Below is the rest of the code.</p>

<p>Thank you so much, and appreciate for the help.</p>

<pre><code>$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 "&lt;p&gt;Your form has succesfully been submit!&lt;/p&gt;";
}
fclose($statusTxt);
}
</code></pre>
