How to implement page timed jump in PHP

Source: Internet
Author: User
This article mainly introduces the PHP page to implement timed jump method, the example shows the use of the header function to achieve jump skills, the need for friends can refer to the next

The example of this article describes the PHP page to implement timed jump method, share for everyone to reference. The implementation method is as follows:

PHP timed jump We need to use the header function to input HTML or JS code to achieve timed jumps, let me introduce a simple example

The PHP code is as follows:

The code is as follows:

Header ("refresh:3;url=http://www.php.cn");

Print (' Loading, please wait ...<br> three seconds to automatically jump to topic.alibabacloud.com~~~ ');

The HTML code for the output is

The code is as follows:

<meta http-equiv= "Refresh" content= "3; Url=http://www.php.cn ">

The same effect.
This enables the automatic jump to http://www.php.cn after 3 seconds.

It is important to note that if your file is uft-8 encoded, we should be careful not to have output or BOM characters in front of the header, which can lead to the inability to jump.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.