Home > Article > Backend Development > How to make a php page jump after a few seconds
How to jump to the PHP page after a few seconds: Use the header function to enter the HTML or JS code to realize the scheduled jump. The code is [header("refresh:3;url=//www.php.cn ");print('Loading, please wait...].
How to jump to the php page after a few seconds:
php timing jump we need to use header function
Enter html or js code to achieve timing jump, let me introduce a simple example
php code As follows:
header("refresh:3;url=//www.php.cn"); print('正在加载,请稍等... 三秒后自动跳转到PHP中文网~~~');
The output html code has the same effect as below.
<meta http-equiv="refresh" content="3;url=//www.php.cn">
This achieves automatic jump after 3 seconds.
Needed here Note: If your file is uft-8 encoded, we must be careful not to have output or BOM characters before the header, which may result in failure to jump.
Want to know more For more programming learning, please pay attention to the php training column!
The above is the detailed content of How to make a php page jump after a few seconds. For more information, please follow other related articles on the PHP Chinese website!