Re: [PHP] Writing to a file that's not PHP_SELF

2002-08-15 Thread Analysis Solutions
On Tue, Aug 13, 2002 at 04:02:51PM -0230, Kondwani Spike Mkandawire wrote: $file = fopen(Counter.txt, r+); $counter = fread($file, filesize(Counter.txt)); fwrite($file, $counter, strlen($counter)); ... snip ... // For some reason the updated value is not written // to Counter.txt

[PHP] Writing to a file that's not PHP_SELF

2002-08-13 Thread Kondwani Spike Mkandawire
Any idea why this is not working... $file = fopen(Counter.txt, r+); $counter = fread($file, filesize(Counter.txt)); fwrite($file, $counter, strlen($counter)); echo 'form name=studVer action = ThisSameFile.php method=post'; if(empty($SomeVariable...)){ $counter++; // Here counter

Fwd: [PHP] Writing to a file that's not PHP_SELF

2002-08-13 Thread Mike Dunlop
$file = fopen(Counter.txt, r+); You need to open the file with write access and PHP must have write permission e.g. $file = fopen(Counter.txt, w+); Mike D... -- Mike Dunlop Webmaster Animation World Network [EMAIL PROTECTED] http://www.awn.com (323) 606-4238 office (323) 466-6619