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();
?>
本站原创转载注明www.111cn.net/phper/php.html
