Several PHP page jump methods are recommended _ PHP Tutorial

Source: Internet
Author: User
We recommend several PHP methods for page jump. 1. how does PHP implement page jump? Phpheader (Location: http: www.baidu.com );? Header () is a php built-in function for page jump. 2. PHP implements page jump method 2

1. PHP implements the first method of page jump

  1. Header ("Location: http:
    // Www.baidu.com ");
  2. ?>

Header () is a php built-in function for page jump.

2. PHP implements page jump. Method 2: Use

 
  1. jsecho "
  2. < script language="javascript">";
  3. echo "location.href='www.abidu.com'";
  4. echo "
  5. < /script>";

3. PHP implements the third method of page jump (The HTML method is used to redirect pages. this method is more practical. you can set the refresh time. it is recommended to use this method .)

 
  1. echo
  2. ("http-equiv='refresh'
    content=0;URl='hehe.html'");

1. if you want to jump to other pages, you can add the index. php parameter? Id = 4 action = add2. parameters after retrieving other pages

 
  1. $id = $_GET[id];
  2. $action=$_GET[action];

The above is the specific PHP method for page jump.


Why? Php header (Location: http: // www.baidu.com );? Header () is a php built-in function for page jump. 2. PHP implements the second method of page jump...

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.