我想将此页面计数器更改为一个独特的页面计数器,我不是那么好的PHP,需要一些帮助。
counter.php文件:
<?php
$datei = fopen("countlog.txt","r");
$count = fgets($datei,1000);
fclose($datei);
$count=$count + 1 ;
echo "$count";
echo " hits";
echo "\n";
$datei = fopen("countlog.txt","w");
fwrite($datei, $count);
fclose($datei);
countlog.txt文件包含页面视图的数量,我在index.php中链接了counter.php
提前致谢