Reply to weird fseek and fwrite issue

Your name:

Reply:


Posted by Feanor on 06/07/07 15:17

i have the following php code set up to test:

<html>
<body>

<?php
if(!$xml = fopen("regData.xml","r+"))
{
echo "ERROR: unable to Open regData.xml";
exit;
}

fseek($xml, 0, SEEK_END);
fwrite($xml, "<test>");
fclose($xml);

?>

</body>
</html>

my original regData.xml:

<reg>

</reg>

regData.xml after php code run:

<test>




Any thoughts on why <test> isnt appended to the end of the file so it
looks like this?:

<reg>

</reg><test>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация