我找到了这个链接
Redirect with Timer in PHP?
我已经试过了
<meta http-equiv="refresh" content="5;url=http://yourdomain.com"/>
<?php
// wait 5 seconds and redirect :)
echo "<meta http-equiv=\"refresh\" content=\"5;url=http://yourdomain.com\"/>";
?>
它的工作,但我想重定向回上一页,知道吗?算法是我在 5 秒后更改页面并希望在 5 秒后返回上一页并继续返回..
对不起,我的英语不好
请您参考如下方法:
使用 HTTP_REFERER 它将为您提供您来到当前页面的页面。
$_SERVER['HTTP_REFERER']
引用: http://php.net/manual/en/reserved.variables.server.php
<?php
// wait 5 seconds and redirect :)
echo "<meta http-equiv=\"refresh\" content=\"5;url=".$_SERVER['HTTP_REFERER']."\"/>";
?>




