Check out :
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1501
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1697
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1359
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1552
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1263
Sincerely
berber
Visit http://www.weberdev.com Today!!!
To see where PHP might take you tomorrow.
-----Original Message-----
From: Richard Banks [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 6:17 PM
To: Php-General
Subject: [PHP] newbie problem: Hit counter.
For some reason the number of hits value is not getting replaced [after
incrementing] into the original counter file.
any help would be appreciated. here is the code :
<?php
$cntfile = "count"; // The filename where the number of hits is stored, if
there isnt one then make it & put the number 0 in it
$rs = fopen ($cntfile, "rw");
while (!feof($rs)) {
$cntr = fgets($rs, 4096);
echo "counter now is $cntr";
echo "<br>";
}
fclose ($rs);
$wr = fopen ($cntfile, "rw");
$cntr+=1;
fputs($wr, $cntr);
echo $cntr;
fclose($wr);
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]