hmmmm.... What happens for the very first time..
Code:
$newcount =
$file="count.txt";
$fh1=fopen($file,"r");
$count=fscanf($fh1,"%d");
fclose($fh1);
$fh=fopen($file,"w+");
$count[0]=$count[0]+$newcount;
Assuming the count.txt is empty, and since your newcount is empty, theres nothing written to the file, on next read we have the same problem..
If your file contains a number (say 1) then on your
$count[0]=$count[0]+$newcount; you have the same problem, the counter isn't incremented, since $newcount isn't holding anything..
On another note, I doubt this code will even run..
$newcount= is an undisclosed statement, which usualy causes an error.