Creating Files
Posted: Sat Apr 03, 2004 12:26 pm
I'm getting a parse error on line 3
its hosted at http://www.hostultra.com/~robjime/ps/newcd.htm
?>
Code: Select all
<?php
$numb = $_POST['numb']
$desc = $_POST['desc']
$filename = "$numb.htm";
$somecontent = "<html><head><title>".$numb."</title><body>".$desc."</body></html>";
if (!$handle = fopen($filename, 'x')) {
echo "Cannot open file ($filename)";
exit;
}
if (fwrite($handle, $somecontent) === FALSE) {
echo "Cannot write to file ($filename)";
exit;
}
echo "Success, wrote ($somecontent) to file ($filename)";
fclose($handle);
} else {
echo "The file $filename is not writable";
?>?>