Hi!
$datei = fopen("stats/counter.txt","r"); #erstmal lesen
$counterstand = fgets($datei, 10);
fclose($datei); # schließen
$datei = fopen("stats/counter.txt","w-"); #schreiben ab position 0
if($counterstand == "") {
$counterstand = 0;
}
$counterstand=$counterstand+1;
fwrite($datei, $counterstand);
fclose($datei);
sollte gehen.
fastix