Header jump in PHP use include contains _php instance to resolve parameter loss problem

Source: Internet
Author: User

Some colleagues reflect that the recent online several games overseas registration can not load style files, the need for emergency repair.

Registration procedures to unify the single entrance, the core judgment is Checkip, only in the name of the template is not a real-name certification procedures to do a game_id judge can. Because too sure, anxious to work out of the psychological, coupled with everyone urged the tension, all of a sudden, made two mistakes: first, the position of the game_id judgment, resulting in many of the following variables did not reach the destination page, and the second is not understand header jump and include contains meaning Directly with the header do jump.

Header jump page, can not inherit the previous page variables and other elements, examples:

a.php file

$userEname = "Crystal";
$userCname = "Chengcheng";
Your code
......... ....
............ Header ("location:b.php");
Your code ... ..........

If you quote $userename in the b.php file, what do you think the result is? The $userename = null at this time. If you include b.php with include, you can avoid the problem of $userename being empty.

The above mentioned is the entire content of this article, I hope you can enjoy.

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.