只是想问一下它是否可能有像“header(location:mysite.com)”,但它是TIMED的。假设五秒钟然后刷新,但刷新后,它将转到另一个站点(如http://mysecondsite.com)。
就像,“点击这里”--> site.php(其中包含 header(location: mysite.com), BUT TIMED )--> 五秒钟后它会自动转到 mysecondsite.com
只是想问一下它是否可能有像“header(location:mysite.com)”,但它是TIMED的。假设五秒钟然后刷新,但刷新后,它将转到另一个站点(如http://mysecondsite.com)。
就像,“点击这里”--> site.php(其中包含 header(location: mysite.com), BUT TIMED )--> 五秒钟后它会自动转到 mysecondsite.com
将重定向到第二页的函数放在 javascript setTimeout() 函数中。
像这样的东西:
<button onClick="setTimeout(function() {
window.location.href = 'http://mysecondsite.com';
}, 5000);">
Pause Then Go
</button>
下面是关于 javascript 的简要说明:Javascript setTimeout() 和 setInterval()
你的意思是在刷新/重定向之前暂停一段时间?如果是这样,你的答案在这里:
header('Refresh: 5; URL=http://yoursite.com/');