Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use php to realize timing automatic Jump

Shulou Source: shulou.com Published: 2022-06-02 22:53:36 09月30日 Update

This article mainly explains "how to use php to achieve timing automatic jump", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to use php to achieve timing automatic jump" bar!

Php to achieve automatic timing jump method: 1, open the corresponding PHP code file; 2, through the "header (" refresh:3;url= https://www.yisu.com");"method to achieve timing jump can be.

This article operating environment: Windows7 system, PHP7.1 version, DELL G3 computer

How does php realize timing automatic jump?

The method of realizing timing Jump on PHP Page

The specific implementation methods are as follows:

Php timing jump we need to use the header function to input html or js code to achieve timing jump. Let me introduce a simple example.

The php code is as follows:

The code is as follows:

Header ("refresh:3;url= https://www.yisu.com");"

Print ('loading, please wait a moment.

Automatically jump to www.yisu.com~~~' after three seconds)

The output html code is

The code is as follows:

The same effect.

This makes it possible to automatically jump to https://www.yisu.com after 3 seconds.

It is important to note here that if your file is uft-8 encoded, we should be careful not to have output or BOM characters before header, which may cause it to fail to jump.

Thank you for your reading, the above is "how to use php to achieve timing automatic jump" content, after the study of this article, I believe you on how to use php to achieve timing automatic jump this problem has a deeper understanding, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Code method learning content that is file output example function character idea situation effect article more environment computer knowledge knowledge point Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Shulou Tech Info MariaDB Docker Apple