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 C

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

[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 ''; if(empty($SomeVariable...)){ $counter++; // Here counter indicates that it has been incremented... echo "cou