Re: fclose() problem

From: Date: Fri, 07 Jul 2000 07:09:32 +0000
Subject: Re: fclose() problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-5331@lists.php.net to get a copy of this message
Thanks, NO go! (not for general use yet) URL for non working is http://peters.house.cx/postcards/pcindex.php3 for working (this part anyway) http://peters.house.cx/postcards/pcindex2.php3 The number between the lines -------- 1855 //is result of echo $Count ------- On Fri, 7 Jul 2000, gautam wrote: > hi, > try this it should work > <? > $name="./pcnum.txt"; > $file=fopen($name,"r"); > $Count=fread($file,filesize($name)); > fclose($file); > $Count= $Count+ 1; // also used $Count += 1 > $fd=fopen($name,"w"); > fputs($fd,$Count); > fclose($fd); > ?> > regards > gautam > > Peter Lewis wrote: <snip> > > " > > > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > -- > If it is to be, it is up to me > > > The thoughts of the righteous are right: but the counsels of the wicked are deceit.

« previous php.general (#5331) next »