adj 2007-11-28 09:03
10行以內--PHP文字計數器
[size=2]超簡潔的文字計數器...只有9行...只需要兩個檔...counter.php & counter.txt
內容如下:
[quote]<?
$counter = "counter.txt";
$fd = fopen($counter, "r");
$num = fread($fd, filesize( $counter ));
fclose($fd);
$fd = fopen($counter, "w");
$users = $num + 1;
echo "$users";
fwrite($fd, $users);
fclose($fd);
?> [/quote]
[/size]