problem with counter

From: Date: Sat, 19 Aug 2000 20:26:42 +0000
Subject: problem with counter
Groups: php.general 
Request: Send a blank email to php-general+get-12602@lists.php.net to get a copy of this message
hi there someone can explain why this counter is counting only until 2? thanks <?php $counterFile ="/var/virtual/internet2001.com.br/files/www/htdocs/progado.com.br/acessos.txt"; function displayCounter($counterFile) { $fp = fopen($counterFile,r); $num = fgets($fp,5); $num += 1; fclose($fp); print "$num"; exec( "rm -rf $counterFile"); exec( "echo $num > $counterFile"); } if (!file_exists($counterFile)) { exec( "echo 1 > $counterFile"); } displayCounter($counterFile); ?>

« previous php.general (#12602) next »