有一个特定的PHP函数可以在一段时间后重定向。我在什么地方见过,但不记得了。这就像登录后的gmail重定向。有谁能提醒我一下吗?
发布于 2011-05-25 12:15:32
您可以使用javascript在一段时间后重定向。
setTimeout(function () {
window.location.href= 'http://www.google.com'; // the redirect goes here
},5000); // 5 seconds
发布于 2011-05-25 12:19:21
您可以尝试这样做:
header('Refresh: 10; URL=http://yoursite.com/page.php');
其中10表示秒。
发布于 2011-05-25 12:16:45
您可能希望使用php写出一个meta标记。
<meta http-equiv="refresh" content="5;url=http://www.yoursite.com">
不建议这样做,但这是可能的。本例中的5是刷新前的秒数。
https://stackoverflow.com/questions/6119451
复制相似问题