On Thu, 5 Jul 2001, Don Read wrote:
> > Anyone know how I can write and read to different lines in a file rather
> > than just adding to the text already on the first line of the file?
>
> A. suck the whole thing up in memory, change it there, write it back out.
Just as a note: for large (text or binary) files, it's better to use a
temporary file (see tmpfile()) and limit the in-memory buffer to smth like
1024. After finishing, do not close the tmpfile (this would automatically
delete it), but lseek and copy back to the original. Anyone know any
better ways to deal with large file contents?
thx,
georgeb
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]