On Fri, 23 Mar 2001 12:39, adam wrote:
> how might i write to a file called "comment.php.comment" and only write
> the text specified to the top of the file, instead of writing it to the
> bottom?

You need several steps to achieve this:

read all of comment.php.comment into an array
open a temp file to write
write the 'text specified' to the temp file
write the array from comment.php.comment to the temp file
once you're happy all is written, close open temp file
rename temp file to comment.php.comment

The functions you need for this can be found in the Filesystem section of 
the docs.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
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]

Reply via email to