Pls could some1 tell me what wrong with this code
Thanks
PHP Code:
<?php
echo '<div id="date">' . date("d/m/Y") . '</div>';
$filename= "counterlog2.txt" ;
$fd = fopen ($filename , "r") or die ("Can't open $filename") ;
$fstring = fread ($fd , filesize ($filename)) ;
echo '<div id="counter">Visits: ' . "$fstring" . '</div>';
fclose($fd) ;
$fd = fopen ($filename , "w") or die ("Can't open $filename") ;
$fcounted = $fstring + 1 ;
$fout= fwrite ($fd , $fcounted ) ;
fclose($fd) ;
?>