Multiple interface redirection methods in php _ PHP Tutorial

Source: Internet
Author: User
Multiple Page jump methods in php. Method 1: header () function header (Location: blog.phpha.com) in PHP );? Note: 1. location and: cannot be empty; otherwise, no jump will be made. 2. there cannot be any input method before header (). 1: header () function in PHP

 
 
  1. header("Location:http://blog.phpha.com");
  2. ?>

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.

 
 
  1. HTML title
  2. Welcome to Tianya PHP blog!

Method 3: javascript implementation

 
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.