Home > Backend Development > PHP Tutorial > A brief analysis of php header jump

A brief analysis of php header jump

高洛峰
Release: 2023-03-03 16:42:01
Original
1119 people have browsed it

PHP’s header function can implement the META tag in HTML code with very little code
Here we only talk about using the header function to jump to the page

1. Code for page jump in HTML code
HTML meta refresh refresh and jump Redirect (redirect) page
refresh attribute value--refresh and jump (redirect) page
* refresh is used to refresh and jump (redirect) page
* refresh appears in the http-equiv attribute and is represented by the content attribute The start time of refresh or jump and the URL of the jump
* Reference URL: http://www.dreamdu.com/xhtml/refresh/

meta refresh example
Refresh this page after 5 seconds:

Go to the Dream City homepage in 5 seconds:

2. Using the header function in PHP
You have already learned about the code for writing jump (redirect) pages in HTML
php code example
header('Refresh: 3; url=http://www .php.cn');


For more brief analysis of php header, please follow the PHP Chinese website to jump to related articles!

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