I guess I should do that.
I need the plain file because is just a log of users registering in a Club,
in a csv format.
Using a database is just too much and not intended for this page... even
when I would prefer using mysql. At least, I can handle that rather than the
fopen and fwrite !.
I could append but then I need to read the first 8 chars of the last line I
appended... neither something I know how to do.
If they were fixed I could... maybe I can fill it with blank chars the line
until a given size ?

Thanxs everyone for your replies.

"Miguel Cruz" <[EMAIL PROTECTED]> escribió en el mensaje
> On Thu, 21 Mar 2002, Mauricio Sthandier wrote:
> > I guess thist must be really silly... but how can I append text to the
> > beginning of a file ???
> > I've been trying since a while... but all I get is overwriting !.
> Open a temporary file, write your new data to it, copy the old file on to
> the end of it, remove the old file, rename the temporary file with the old
> file's name.
> Obviously this is not very efficient. Explore whether you really need to
> prepend. Perhaps you can append and then read the file backwards a la tac?
> Or perhaps a database is more useful. Or multiple files.
> miguel

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to