Detailed explanation of header redirection and include _ PHP Tutorial

Source: Internet
Author: User
Detailed descriptions of header redirection and include. The registration process goes through a single portal. The core judgment is checkip. you only need to make a game_id judgment in the template program without real-name authentication. Because the psychological registration program that is too positive and eager to get off work takes a single entrance, the core judgment is checkip, you only need to make a game_id judgment in the template program that has not passed real-name authentication. Because I was too certain and eager to get off work, coupled with the stress of everyone's urging, I was suddenly blinded and made two mistakes: first, the location of game_id was determined in advance, as a result, many variables are not uploaded to the target page. second, they do not understand the meaning of header jump and include, and directly use headers for redirect.

The page after the header jump cannot inherit the variables and other elements of the previous page. for example:
A. php file

$ UserEname = "crystal ";
$ UserCname = "Cheng ";
// Your code
................................
Header ("location: B. php ");
// Your code
..................

If $ userEname is referenced in the B. php file, what is the result? Okay, no more customs clearance. $ userEname = null at this time. If you use include to include B. php, you can avoid the problem of null $ userEname. This is what peng reminds me.
Post-speech: it was done when it was around, and peng dared to go home after it was done. I would like to be a dedicated person. I promised to accompany her to the shopping mall after work. after waiting for two hours at the company, I was beaten. It seems that there are still many such cases. it is estimated that she will not go shopping with me in the future... Ah ~ Programmer, it really cannot hurt!

Bytes. Because it is too positive and eager to get off work...

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.