discuz7 我现在想在主页index.php上加个查询数据的功能,但是第二次的数据没有去数据库查询而是上次查询出来的缓存数据,要怎样才能每次都去数据库查询呢?分数不多....但请各位大虾帮帮我.....
解决方案 »
- 有人做过 采集奇艺视频的吗 求指点
- preg_match('/*+(swf)$/i',$_FILES["upfile"]["name"]) 为什么不行??
- 网站运行一段时间后,一些目录下出现一些core.*文件,请问是什么?有什么用?怎么用?出现这个正常吗?是否需要使其不出现?如何使其不出现?
- 有关IMAP的问题,求大神解决~~~~~
- 本人小菜,请这里的人帮忙~~~~~~~~~~
- 搞来搞去就是搞不明白.我真菜呀~5555555555555~~来帮帮我
- 急救,mysql的连接问题???
- 密吗认证问题?奇怪的狠
- php 正则
- window下PHP5 怎样配置日志
- 关于用phpmailer发送邮件的问题
- php连接数据库后没输出 大侠们帮忙看看!
discuz7 我现在想在主页index.php上查询访问者的真实ip但是每次都是上次缓存的数据
define('BINDDOMAIN', 'index');require_once './include/common.inc.php';
$flag = $onlineip;
if(!$loadforum) {
if($indextype) {
$op = empty($op) ? $indextype : $op;
$indexfile = in_array($op, array('classics', 'feeds')) ? $op : 'classics';
} else {
$indexfile = 'classics';
} if($indexfile == 'classics' || !empty($gid)) {
require_once DISCUZ_ROOT.'./include/index_classics.inc.php';
} elseif($indexfile == 'feeds') {
require_once DISCUZ_ROOT.'./include/index_feeds.inc.php';
} else {
showmessage('undefined_action');
}
} else {
require_once './forumdisplay.php';
}
header.htm:
<!--{if !empty($flag)}-->
<!--<input type='hidden' id='success' value='$flag'/>-->
<!--{else}-->
<!--fail-->
<!--{/if}-->
这个跟数据库没有关系的.....我开始是说错了...
if(!empty($_SERVER["HTTP_CLIENT_IP"])){
$cip = $_SERVER["HTTP_CLIENT_IP"];
}else if(!empty($_SERVER["HTTP_X_FORWARDED_FOR"])){
$cip = $_SERVER["HTTP_X_FORWARDED_FOR"];
}else if(!empty($_SERVER["REMOTE_ADDR"])){
$cip = $_SERVER["REMOTE_ADDR"];
}else{
$cip = "无法获取!";
}
return $cip;
}
直接GetIP()