Re: problem with counter
| From: | gstrein andreas | Date: | Sat, 19 Aug 2000 20:34:20 +0000 |
| Subject: | Re: problem with counter | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-12603@lists.php.net to get a copy of this message | ||
hi,
i dont see any code where you update the counter file !
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/_/ viva technologies
_/ gstrein andreas
"Always listen to the experts; they'll tell you what can't be done and why.
Then do it."
- Robert A. Heinlein
----- Original Message -----
From: "Daniel Carlos Silva" <dcsilva@setelagoas.com.br>
To: "PHP-General Mailing List" <php-general@lists.php.net>
Sent: Saturday, August 19, 2000 10:26 PM
Subject: [PHP] problem with counter
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.t
xt";
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);
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net