fread cannot read new line added
<p>i have this code to write line into new.txt(already consist of 2 line) file and after that copy(backup) this txt content into new tmp.txt file
but the fread() keep missing the new line from new.txt file to copy into tmp.txt
tmp.txt suppose to have 3 line inside, but the new added line missing.</p>

<pre><code>$File ="new.txt";
$File2="tmp.txt";


//write into file
$handle = fopen ($File, 'a') or die("Cannot open File");    
fwrite($handle,"some string");
fclose($handle );

//copy file
$handle2= fopen ($File, 'r') or die("Cannot open File");
$content = fread($handle2, filesize($File));
fclose($handle2);   

$handle3 = fopen ($File2, 'w') or die("Cannot open File");  
fwrite($handle3,$content);
fclose($handle3 );
</code></pre>
