Home > Backend Development > PHP Tutorial > Three ways to jump to PHP pages

Three ways to jump to PHP pages

WBOY
Release: 2016-07-25 08:46:17
Original
833 people have browsed it

PHP page jump 1: header() function

The header() function is defined as follows:

void header (string string [,bool replace [,int http_response_code]])

//Redirect browser

header(“Location: http://blog.csdn.net/abandonship”);

PHP page jump 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 the content. If content="seconds;url=website" is set, it defines how long it will take for the page to jump to the specified URL.

PHP page jump 3, JavaScript echo the following js code

window.location.href=’$url’

Three types, jump, PHP


Related labels:
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