该页面不会重定向IE9,但可以在Chrome和IE 11中运行。当用户单击登录按钮而没有完成凭据时,代码应显示文本和错误消息。该页面将粘贴到URL http://xxx.xxx.com/customer.php?action_nm=custlogin,并且不会响应以下代码。重定向PHP代码不适用于IE 9
是否有任何已知的问题,IE9和以下的做法导致重定向不能在PHP中工作?
if(!empty($_POST["email"])){
$_SESSION["Email"] = $_POST["email"];
redirect("customer.php?action_nm=custlogin&action=xpwd");
exit;
}
else
{
redirect("customer.php?action_nm=custlogin&action=nocredentials");
exit;
}
}
这低于funcition:
function redirect($s){
echo '<script language="JavaScript">
function redir() { document.location="'.$s.'"; }
console.log("' . $s . '")
redir();
</script>';
}
向我们展示'redirect()'函数的内容? –
该功能已添加,并且不会占用该文章的格式 –
为什么您使用javascript进行重定向? –