根据目录找到文件: UCenter的 model/base.php
查找:
$this->onlineip = $match[0] ? $match[0] : 'unknown';
在这代码之后插入一段代码:
//COOKIE <=> onlineIP :
$isonlineIP = isset($_COOKIE['onlineipd']) && !empty($_COOKIE['onlineipd']); if($isonlineIP){ $this->onlineip = $_COOKIE['onlineipd']; }else{ setcookie("onlineipd", $this->onlineip, time()+3600, "/"); } unset($isonlineIP);