Home >Backend Development >PHP Problem >How to jump after a few seconds in php
How to implement jump after a few seconds in php: First create a PHP sample file; then implement it through "header("refresh:5;url=http://www.XXXXX.com");" It will jump after a few seconds.
Recommended: "PHP Video Tutorial"
Method one:
<?php header("refresh:5;url=http://www.XXXXX.com"); print('正在加载,请稍等...<br>五秒后自动跳转。'); ?>
Method two:
<script language="JavaScript"> function myrefresh(){ window.location.href="<?php echo $url_web ?>"; } setTimeout('myrefresh()',3000); //指定3秒转跳 </script>
The above is the detailed content of How to jump after a few seconds in php. For more information, please follow other related articles on the PHP Chinese website!