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]