后台绑定 IP 地址是出于安全的考虑,建议更换一个稳定的网络环境,由于最近代码改动较大,你可以
system\aws_controller.inc.php
$admin_info['ip'] == $_SERVER['REMOTE_ADDR']
或者
$admin_info['ip'] != $_SERVER['REMOTE_ADDR']
将这段条件注释
注释后出错,管理员能给下详细的更改代码吗?
已经解决,下面贴出需要注释的代码,给需要的朋友:
原代码:$admin_info = H::decode_hash(AWS_APP::session()->admin_login);
if ($admin_info['uid'] != $this->user_id OR $admin_info['UA'] != $_SERVER['HTTP_USER_AGENT'] OR $admin_info['ip'] != fetch_ip() OR !AWS_APP::session()->permission['is_administortar'])
{
unset(AWS_APP::session()->admin_login);
if ($_POST['_post_type'] == 'ajax')
{
H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('会话超时, 请重新登录')));
}
else
{
HTTP::redirect(get_setting('base_url') . '/?/admin/login/url-' . base64_encode($_SERVER['REQUEST_URI']));
}
}
TPL::import_clean();
将下面代码删掉:{
unset(AWS_APP::session()->admin_login);
if ($_POST['_post_type'] == 'ajax')
{
H::ajax_json_output(AWS_APP::RSM(null, -1, AWS_APP::lang()->_t('会话超时, 请重新登录')));
}
else
{
HTTP::redirect(get_setting('base_url') . '/?/admin/login/url-' . base64_encode($_SERVER['REQUEST_URI']));
}
}
更改后:
$admin_info = H::decode_hash(AWS_APP::session()->admin_login);
if ($admin_info['uid'] != $this->user_id OR $admin_info['UA'] != $_SERVER['HTTP_USER_AGENT'] OR $admin_info['ip'] != fetch_ip() OR !AWS_APP::session()->permission['is_administortar'])
TPL::import_clean();
阅读全文
收起全文