关于访客计数器 你加一个判断if(用户=管理员 or 已登录){不加一.} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 写进session里的变量刷新也不会加1了 用session和cookie都能不过。效果不好我做过那个东西做了看了就没心情 ok,原来如此ps:楼上的是不是也经常打cs啊 <? session_start(); if (session_is_registered("ip")) { $link=fopen("counter.txt","r+"); $counter=fgets($link,8); $counter=trim($counter); fclose($link); } else { $ip=getenv("remote_addr"); session_register("ip"); $link=fopen("counter.txt","r+"); $counter=fgets($link,8); $counter=$counter+1; $counter=trim($counter); rewind($link); fwrite($link,$counter,8); fclose($link); }?>这个在www.freweb.net/go/liukai里用的在我自己家里用不怎么好用在服务器上就凑合了要是要在精确点的我还有办法,用ip和端口来判断。那样一个网吧来的就没问题了 这个asp怎么转成php mysql时间字段查询,在线等 apache 为什么不支持.htaccess 文件? js 如何去网页的标题栏和状态栏 表单数据提交后错误返回,原来填在表单的数据就没了 创建目录的问题 Uncaught exception 'ImagickException' with message 'UnableToOpenFile ` 怎么样将表中内容一样的记录只保留一条? php中咋样把字符串转化为asc码 PHP微信商城,怎样实现提现功能,即将零钱提现到中国银行或者工商银行??? 看一下这段程序可以返回值吗?是C++的话可以吗? 页面参数传递问题
session_start();
if (session_is_registered("ip"))
{
$link=fopen("counter.txt","r+");
$counter=fgets($link,8);
$counter=trim($counter);
fclose($link);
}
else
{
$ip=getenv("remote_addr");
session_register("ip");
$link=fopen("counter.txt","r+");
$counter=fgets($link,8);
$counter=$counter+1;
$counter=trim($counter);
rewind($link);
fwrite($link,$counter,8);
fclose($link);
}
?>
这个在www.freweb.net/go/liukai里用的
在我自己家里用不怎么好用在服务器上就凑合了
要是要在精确点的
我还有办法,
用ip和端口来判断。那样一个网吧来的就没问题了