PHP标题重定向在IE 8上不起作用 [英] PHP header redirection does not work on IE 8

查看:112
本文介绍了PHP标题重定向在IE 8上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在php下重定向:

  header(Location:mask.php)
不使用时,$ c>

不会使用 8,

我该如何解决这个问题?

PS: header(Location :http:// ......)不起作用。

解决方案

您缺少; 在结尾处,您需要 exit 您的脚本,因此不再执行脚本。

 <?php 
header(Location:mask.php);
出口; //在最后加入
?>

测试 IE 制作示例页面重定向到某个地方并在 NetRenderer 上进行测试


A redirection under php:

header("Location: mask.php")

does work with IE 9, google chrome, firefox, but not with IE 8.

How can I fix this?

PS: header("Location: http://......") does not help.

解决方案

You lack ; at the end end you need to exit your script so no script is executed anymore.

<?php
    header("Location: mask.php");
    exit; // with die at the end
?>

To test on IE make a sample page that redirects someplace and test on NetRenderer

这篇关于PHP标题重定向在IE 8上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆