【发布时间】:2011-08-30 04:44:34
【问题描述】:
在我的 hitcount 系统中,我尝试捕获当前“hitter”的 IP 并将此会话保持一小时。
部分功能:
$this->Session->write('hit_ip', $this->RequestHandler->getClientIP());
如果我回显 hit_ip 会话,或者:
echo $this->RequestHandler->getClientIP());
它回显'1::1'
我应该如何使用这个功能?是的,我将 requestHandler 添加到了我的 app_controller 中的 Components var
非常感谢!
【问题讨论】:
标签: cakephp