sbf123官网

上次流量大太经常出问题今天修改过来了.

php
文件计数据器+mysql双保护,这是上次升级版了,上次流量大太经常出问题今天修改过来了.

?phprequire_once(../inc/connect.php);Class Sit_count{ public $FileName
= ‘count.txt’; function Count_add(){if(file_exists($this-FileName)
){$Temp = file_get_contents($this-FileName);$Array =
explode(=,$Temp);if(count($Array) != 2){$Tmp
=’mytext=’.$this-Tcount();}else{$Total = $Array[1]+1;$Tmp
=$Array[0].’=’.$Total;}$T =
@fopen($this-FileName,’w’);if($T){fwrite($T,$Tmp);fclose($T);}mysql_query(update
wk_count set count_bak =count_bak+1 where id=1);}else{echo ‘!
file_exists’;} } function Tcount(){ $result =mysql_query(Select *
from wk_count where id =1 ) or die(mysql_error());$rs
=mysql_fetch_array($result);return $rs[‘count_bak’]; }} $tp = new
Sit_count; $tp-Count_add();?本站原创转载注明

发表评论

电子邮件地址不会被公开。 必填项已用*标注

相关文章