heres the solution
$fp=fopen("/tmp/number.txt","r+");
$readarr=file("/tmp/number.txt");
$read=$readarr[0];
echo "this is the value of read this time ->
".$read." <-";
$read+=1;
echo "this is the value of read this time -> ".$read." <-";
fwrite($fp,$read);
fclose($fp);
regards
Mandar Kelkar