我做了这样一个函数,为了方便查看用户从哪里登陆的我的网站,和这个函数有关么? function address($type,$allow=1) { $resor=$_SERVER['HTTP_REFERER']; if(mysql_fetch_array(mysql_query("select * from record where address='$resor' and type='$type'"))) mysql_query("update record set times=times+1 where address='$resor' and type='$type'"); else mysql_query("insert into record set type='$type',address='$resor',times=1,allow=$allow"); } 使用的时候是address("首页");这样。
function address($type,$allow=1) {
$resor=$_SERVER['HTTP_REFERER'];
if(mysql_fetch_array(mysql_query("select * from record where address='$resor' and type='$type'"))) mysql_query("update record set times=times+1 where address='$resor' and type='$type'");
else mysql_query("insert into record set type='$type',address='$resor',times=1,allow=$allow");
}
使用的时候是address("首页");这样。
现在要命啊,每次访问都会在数据库中多了一个sleep
我发现现在访问一个固定帖子的时候会产生sleep进程,点击的时候,就不能完全打开,然后会产生sleep,不管再去其他任何页面也一样。