appending to XML file before closing tag
| From: | William S. | Date: | Tue, 25 Jun 2002 13:31:07 +0000 |
| Subject: | appending to XML file before closing tag | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-103772@lists.php.net to get a copy of this message | ||
This works pretty well to append content to
an XML file. However, I need to keep the
closing tag where it belongs: at the end of
the file. This only appends to the end and
doesn't work.
I use ...
$myecho = "Hello World";
$file_name = "file.xml";
$file_pointer = fopen($file_name, "a");
fwrite($file_pointer, $myecho);
fclose($file_pointer);
I know I need to introduce: fread() and fseek().
but not sure how to put it all together.
Anyone?
--
Bill
Amsterdam, NL