Code:
<?php
$ourFileName="newfile.txt";
$fh = fopen($ourFileName, 'a+') or die("Can't open file");
echo " File opened: ".ftell($fh);
fwrite($fh,"<image></image>");
fseek($fh,-8,SEEK_END);
fwrite($fh,"Data Written");
fclose($fh);
?>
Whats wrong here?
Its output is as follows:
Code:
<image></image>Data Written
Where as expected output is:
Code:
<image>Data Written</image>
Any Suggestions?

Last edited by Bhullarz; 18Feb2009 at 11:02.. Reason: code added