[php] counter

Pagina: 1
Acties:
  • 37 views sinds 30-01-2008

  • aqua_man
  • Registratie: Januari 2002
  • Laatst online: 26-07-2023

aqua_man

one life, live it!

Topicstarter
ja hoor, ongeveer het simeplste PHP-scriptje en ik krijg het voor elkaar dat het niet lukt...
ik heb een zelf gemaakte counter, ongeveer de simpelste mogelijk, maar je moet makkelijk beginnen.
PHP:
1
2
3
4
5
6
7
8
9
<?
$file = fopen("/var/www/user/HTML/count.txt", "r+");
    $counter = trim(fgets($file, 800));
fclose($file);
$counter++;
$file = fopen("/var/www/user/HTML/count.txt", "w+");
    fwrite($file, $counter . "\n");
fclose($file);
?>

en ergens in de BODY staat: <? echo $counter ?>
maar hoe vaak ik ook reload, hij blijft op 1 staan.
count.txt heeft al 777
wat doe ik fout?

2 swim or not 2 swim, that's the question


  • aqua_man
  • Registratie: Januari 2002
  • Laatst online: 26-07-2023

aqua_man

one life, live it!

Topicstarter
lama, heb m al gefixd

2 swim or not 2 swim, that's the question


  • D2k
  • Registratie: Januari 2001
  • Laatst online: 31-08 10:19

D2k

Doet iets met Cloud (MS/IBM)


Dit topic is gesloten.