PHP計數器
$counterFile = "balong.txt";//存儲數值的文件名幾路徑
function displayCounter($counterFile) {
$fp = fopen($counterFile,"rw");
$num = fgets($fp,5);
$num += 1;
print "您是第 "."$num"." 個看巴泷計數器的家伙";
exec( "rm -rf $counterFile");
exec( "echo $num > $counterFile");
}
if (!file_exists($counterFile)) {
exec( "echo 0 > $counterFile");
}
displayCounter($counterFile);
?>