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.
PS, I'll show you why this afternoon sometime!
Warning: fopen(users.data) [function.fopen]: failed to create stream: Permission denied in /freeola/users/3/1/sr0113/htdocs/check.php on line 50
Warning: fwrite(): supplied argument is not a valid stream resource in /freeola/users/3/1/sr0113/htdocs/check.php on line 51
Warning: fclose(): supplied argument is not a valid stream resource in /freeola/users/3/1/sr0113/htdocs/check.php on line 52
The code (it's in amongst other code that works):
$filename = "users.data";
$fp = fopen($filename,"r");
$counterval = fread($fp, filesize($filename));
fclose($fp);
$counterval = (integer)$counterval + 1;
$fp = fopen($filename,"w+");
fwrite($fp, $counterval, 26);
fclose($fp);
Or maybe for people without skillz... whatever. Anyway, they supress errors and warnings, which is bloody useful when you have a function that works as you want it to but displays a warning about something or other.
$filename = ""; // relative path to the hits file (must have 666 perm
issions)
$fp = @fopen($filename,"r");
$counterval = @fread($fp, filesize($filename));
@fclose($fp);
$counterval = (integer)$counterval + 1;
$fp = @fopen($filename,"w+");
@fwrite($fp, $counterval, 26);
@fclose($fp);
?>
Then you can just slap in wherever.