ecshop后台ie6登录不了

本人把echsop后台路径改成有_下划线的路径之后ie6登录不了(但在ie7之上都可以)

经过一上午的调试,终于找到原因,就是$_SERVER['HTTP_REFERER'] 把下划线转成了%5F 于是程序对比时出错了

最后把后台的 init.php里的代码 修改成下面

 

if ($_REQUEST['act'] != ‘login’ && $_REQUEST['act'] != ‘signin’ &&
$_REQUEST['act'] != ‘forget_pwd’ && $_REQUEST['act'] != ‘reset_pwd’ && $_REQUEST['act'] != ‘check_order’)
{
$admin_path = preg_replace(‘/:\d+/’, ”, $ecs->url()) . ADMIN_PATH;
$_SERVER['HTTP_REFERER']=urldecode($_SERVER['HTTP_REFERER']);
if (!empty($_SERVER['HTTP_REFERER']) &&
strpos(preg_replace(‘/:\d+/’, ”, $_SERVER['HTTP_REFERER']), $admin_path) === false)
{
if (!empty($_REQUEST['is_ajax']))
{
make_json_error($_LANG['priv_error']);
}
else
{
ecs_header(“Location: privilege.php?act=login\n”);
}

exit;
}
}

你可能感兴趣的:(Ajax,server,header,IE,Path,login)