AN ESAY HIT COUNTER

1 <?php

2 $counts = ("hitcounter.txt");

3 $hits = file($counts);

4 $hits[0] ++;

5 $fp = fopen($counts , "w");

6 fputs($fp , "$hits[0]");

7 fclose($fp);

8 echo "<h2>now,the hit count is:</h2>"."<h1>".$hits[0]."</h1>";?>

 

你可能感兴趣的:(count)