下面的脚本等待2秒钟,然后仅显示最后一个htm。
如何显示第一页,然后等待2秒钟,然后显示第二页?
<?php
header("Location: http://10.xxx.24.xx/holdingpage.htm");
sleep(2);
header("Location: http://10.xxx.24.xx/webpageTMMSTATE.htm");
die();
?>
我也很乐意不显示第一页,而只是在页面上打印一些文本,然后等待2秒钟才能显示下一页。
将重定向逻辑从PHP移到HTML。例如,在您的holdingpage.htm中:
<head>
<meta http-equiv="refresh" content="2;http://10.xxx.24.xx/webpageTMMSTATE.htm" />
etc...
</head>
这样,当您加载holdingpage.htm时,它将等待2秒钟,然后发出使用webpageTMMSTATE.htm刷新页面的请求。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句