Forum Moderators: coopster
Warning: fopen(): Unable to access test.html in /home/sc256/www/scripts/add.php on line 12
Warning: fopen(test.html): failed to open stream: No such file or directory in /home/sc256/www/scripts/add.php on line 12
Warning: filesize(): Stat failed for test.html (errno=2 - No such file or directory) in /home/sc256/www/scripts/add.php on line 13
Warning: fread(): supplied argument is not a valid stream resource in /home/sc256/www/scripts/add.php on line 13
Warning: fclose(): supplied argument is not a valid stream resource in /home/sc256/www/scripts/add.php on line 14
The code I'm using is:
<?php$stuff = ("
<b>$category Reviews -$title-</b><br><br>
[Author: $author]<br>
[Permission granted for use]<br><br>
$review");
$filename = $title . ".html";
$create = fopen(filename, "w");
fclose($create);
$file = fopen($filename, "r");
$read = fread($file, filesize($filename));
fclose($file);
$blah = fopen($filename, "w"); //Leave alone look and learn, only edit if you know php
$news=stripslashes($news);
fwrite($blah, "$news $read");
fclose ($blah);
?>
All of the variables in $stuff is defined by a form that goes to this page. Help please?