fclose() error and can't figure it out!
Hello everyone... hopefully this will be quick:
I have a flash game that writes the submitted final score and log in name to the highscores list through php (no SQL here)
Everything is set up, everything works, and get this: on another site the scores work perfectly!
Now when I take all the files off the test site and place them on the final resting place site the highscores wont work (and yes I changed ALL instances of global.domain= LOL)
I have traced the error and made a report, and I get this:
PHP Warning: fclose(): supplied argument is not a valid stream resource in /my/domain/and/path/to/scores.php on line 9
line 9 of the scores.php looks like this:
fclose ($file);
with the whole lines upto there as this:
<?php
$winscore = (int)$winscore;
// Create a Blank File if it doesn't already exist
if (!file_exists($filename))
{
$file=fopen($filename, "w");
fclose ($file);
}
So, with this error pointing to the php, I am guessing it is there? Anyone know how to get by this?
Thanks!
________