Re: re: Overwriting specific lines in text files withoutrewritingthe whole thing.
| From: | Carroll Barrett | Date: | Tue, 27 Jun 2000 15:58:48 +0000 |
| Subject: | Re: re: Overwriting specific lines in text files withoutrewritingthe whole thing. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-3358@lists.php.net to get a copy of this message | ||
Bill,
Drawing upon my vast php experience (1 year), I've come up with
the only possible answer: I don't know.
Anyone?
Regards,
Carroll Barrett
-----Original Message-----
From: Bill Rausch <bill@numerical.com>
To: Carroll Barrett <cbarrett@inalt.com>
Cc: php-general@lists.php.net <php-general@lists.php.net>
Date: Tuesday, June 27, 2000 10:53 AM
Subject: Re: [PHP] re: Overwriting specific lines in text files
withoutrewritingthe whole thing.
>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
>