new day, new question...
I try to implement a simple visitor counter on my page like this:
Code: Select all
$counter = fopen("counter.md","r+");
$wert = fgets($counter, 5);
if($wert == "") $wert = 0;
$wert++;
rewind($counter);
fwrite($counter, $wert);
fclose($counter);
Is it possible to avoid this behaviour if I add the code at an other position? If yes, I coudn't figure out where.
I'm also open for other solutions.
Thanks for your help,
Johannes