In simple there is any way to redirect a page for every ten seconds in PHP
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Using HTML:
<meta http-equiv="refresh" content="10">
Using JavaScript:
window.setTimeout(function() {
location.reload();
}, 10000)
These will reload only the current page.
回答2:
You don't need PHP for that. HTML will be enough. If you redirect to a page that has the same meta tag defined all the time you will have your "redirect-every-10-seconds".
<html>
<head>
<meta http-equiv="Refresh" content="10; url=http://www.example.com/">
</head>
<body>
page body
</body>
</html>
回答3:
header( "refresh: 10; url={$_SERVER['PHP_SELF']}?{$_SERVER['QUERY_STRING']}" );