Method 1: header () function in PHP note: there cannot be blank & amp; 26684; between 1location and:; otherwise, no jump will be made. 2. there cannot be any output before header. 3. PHP code after header () will be executed. Method 2: the Meta tag is HT.
Method 1: header () function in PHP
- header("Location:http://blog.phpha.com");
- ?>
Note:
1. no space is allowed between location and:; otherwise, no jump is made.
2. there cannot be any output before header.
3. PHP code after header () will be executed.
Method 2: Meta tag
Meta tag is the tag that provides document Meta information in HTML. you can use this tag in a PHP program to redirect pages. If http-equiv is defined as refresh, the page will be redirected to the corresponding page within a certain period of time based on the value specified by content. If you set content = "seconds; url = url", it defines how long the page will jump to the specified url.
-
- HTML title
-
- Welcome to Tianya PHP blog!
Method 3: javascript implementation