我不能没有工作...头()与延迟IE
<?php
header("Refresh: 5; URL=http://www.mywebsite.com");
?>
...在Internet Explorer的工作(该死!)。
它在Chrome的伟大工程,如果我用...
header("Location: http://www.mywebsite.com");
...它工作在两个,但我没有得到任何的延迟。
我不能没有工作...头()与延迟IE
<?php
header("Refresh: 5; URL=http://www.mywebsite.com");
?>
...在Internet Explorer的工作(该死!)。
它在Chrome的伟大工程,如果我用...
header("Location: http://www.mywebsite.com");
...它工作在两个,但我没有得到任何的延迟。
尝试将其作为元标记或通过JavaScript重新加载。
Meta标记:
<meta http-equiv="refresh" content="5;URL='http://example.com/'">
的Javascript:
window.onload = new function() {
setTimeout(function() {
location.reload();
}, 5000);
};
谢谢!虽然我最终与location.href =“http://www.mywebsite.com”,因为我想它重定向,而不是刷新:) – 2012-08-07 20:57:59
@Oskwish没问题。很高兴它有帮助。 ;) – 2012-08-07 21:00:20
如果需要延迟,只是使用元刷新,或JavaScript。 – Brad 2012-08-07 20:47:51
[PHP头(“刷新”)问题]的可能重复(http://stackoverflow.com/questions/1884365/php-headerrefresh-problems) – GolezTrol 2012-08-07 20:51:26