Home > Backend Development > PHP Tutorial > Example of page jump in PHP_PHP tutorial

Example of page jump in PHP_PHP tutorial

WBOY
Release: 2016-07-21 14:53:14
Original
794 people have browsed it

Method 1: header() function in PHP

header("Location:http://www.downcc.com");
?>

Note:
1. There cannot be a space between location and :, otherwise it will not jump.
2. There cannot be any output before header().
3. The PHP code after header() will also be executed.

Method 2: Meta tag

The

Meta tag is a tag in HTML that is responsible for providing document meta-information. Using this tag in a PHP program can also achieve page jumps. If http-equiv is defined as refresh, when the page is opened, it will jump to the corresponding page within a certain period of time based on the value specified by content. If content="seconds;url=website" is set, it defines how long it will take for the page to jump to the specified URL.




HTML title

I love PHP!

Method 3: javascript implementation

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/371389.htmlTechArticleMethod 1: header() function in PHP?php header(Location:http://www.downcc.com ); ? Note: 1. There cannot be a space between location and:, otherwise it will not jump. 2. There cannot be anything before header()...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template