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>";?>
原文:http://www.cnblogs.com/vickygiacomo/p/4441266.html