Re: re: Overwriting specific lines in text files without rewritingthe whole thing.

From: Date: Tue, 27 Jun 2000 15:30:26 +0000
Subject: Re: re: Overwriting specific lines in text files without rewritingthe whole thing.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-3355@lists.php.net to get a copy of this message
Well I'll be a ... :-) I've only been using PHP for two weeks. I didn't realize those functions existed. It appears that they would work, since there is also an fseek() and ftell() available. If he's just got a few entries, consecutive freads would work till you found the entry of interest. If he's got a lot, then some random access would be useful. If these functions work like the ANSI C functions, then you have to be very careful to use fflush() appropriately when doing random access in the file. I don't see an fflush() in PHP. Does that mean it's not necessary? Bill At 8:27 AM -0700 6/27/00, Carroll Barrett wrote: >Bill, > >Can't you do the same thing in php, using fopen(), fread(), >fwrite(), flock(), fclose()? > >Regards, >Carroll Barrett --- Bill Rausch, Software Development, Unix, Mac, Windows Numerical Applications, Inc. 509-943-0861 bill@numerical.com

« previous php.general (#3355) next »