Home  >  Article  >  Backend Development  >  A brief analysis of php header jump

A brief analysis of php header jump

高洛峰
高洛峰Original
2016-12-20 10:10:061068browse

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!

Statement:
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