Christoph: Dateien

Beitrag lesen

Das ist ein einfacher Counter:
$datei = fopen("stats/counter.txt","w+");
     $counterstand = fgets($datei, 10);
     if($counterstand == "") {
         $counterstand = 0;
         }
     $counterstand++;
     fwrite($datei, $counterstand);
     fclose($datei);

Doch warum steht in der Datei immer nur die selbe Zahl. Ich erhöhe sie doch mit $counterstand++ um 1??????

danke im voraus.
Christoph