The script that I am about to show you works perfectly offline when I am using apache, but online it gives me the error message that I programmed in there. Let me show you the script.
<head>
<title>Mithica News</title>
</head>
<body>
<?
$filename = "/news.txt";
$newstring = "
$pname<br>
$pemail<br>
$pjob<br>
$pdate<br>
$ppost<br><br>
";
$myfile = @fopen($filename, "a") or die("Couldn't open file to write to it");
@fwrite($myfile, $newstring) or die("Couldn't write to file.");
fclose($myfile);
?>
<?
$filename = "/news.txt";
$whattoread = @fopen($filename, "r") or die("Couldn't open file to read from it");
$file_contents = fread($whattoread,filesize($filename));
$msg = "$file_contents";
fclose($whattoread);
?>
<? echo "$msg"; ?>
</body>
It's for a news page. There is another site before this one that sends all the variables here. Someone please help me. It may have something to do with directories on the FTP server. Thanks.