The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
if(isset($updatetext))
{
$fp=fopen($filename, "w");
fwrite($fp, $updatetext);
}
?>
To update a variable called "frontpage.data". I've used exactly the same on another site, but it doesn't seem to be working for this one. This will create the variable too, right? That's what it did before.
> THe Freeola servers do not support Frontpage extension. If the
> function you are trying to use within frontpage requires this then it
> will not work.
Errr..."frontpage.data" is the name of a variable that wouldn't update. Thought you'd know that, being the resident techie guy.
Anyway, I've sorted this now and pocketmonkey is back from the dead! I'm very dissappointed with the lack of and quality of customer service from FREEOLA though.
Freeola-moderator.
Ooh.
:-D
> > $filename="frontpage.data";
> if(isset($updatetext))
> {
> $fp=fopen($filename, "w");
> fwrite($fp, $updatetext);
> }
> ?>
>
> To update a variable called "frontpage.data". I've used
> exactly the same on another site, but it doesn't seem to be working
> for this one. This will create the variable too, right? That's what
> it did before.
THe Freeola servers do not support Frontpage extension. If the function you are trying to use within frontpage requires this then it will not work.
But like Rob said, all FTP clients have the feature to alter them, you'll need to make the file you want to edit writeable as well as readable.
Aaaaanyway, how do I go about changing permissions? I never had to before. Maybe that'll sort out Pocketmonkey too!
$filename="frontpage.data";
if(isset($updatetext)) {
$fp = fopen($filename, "w");
if (!$fp)
die("
Could not open file.
");fwrite($fp, $updatetext);
close($fp);
}
?>
It'll let you know if the file couldn't be opened, which would be a good reason for it not working. The file won't be opened if it doesn't exist (i.e. you have used the wrong name) or you don't have the correct permissions set on it (i.e. you aren't authorised to open/write to it).
On Freeola Sites, you have to change the chmod's on the files you wish to write to, as by default they are only readable I believe.
ps, this is more or less exactly the same PHP you taught me ages ago, but it's stopped working all of a sudden.