Home  >  Article  >  Backend Development  >  Detailed explanation of header jump and include inclusion issues

Detailed explanation of header jump and include inclusion issues

高洛峰
高洛峰Original
2016-12-20 11:02:371433browse

The registration process uses a single entrance. The core judgment is at the checkip. You only need to make a game_id judgment at the template program that has not been authenticated by real name. Because I was too sure and eager to get off work, coupled with the nervousness of everyone urging me, I was confused all of a sudden and made two mistakes: First, the game_id was judged in advance, resulting in many subsequent variables not being passed to the destination page; The second is that they do not understand the meaning of header jump and include, and directly use header to jump.

The page after the header jump cannot inherit variables and other elements from the previous page. For example:
a.php file

$userEname = "crystal";
$userCname = "Chengcheng";
//your code
................................
header("location:b.php");
//your code
........................

If $userEname is quoted in the b.php file, what do you think the result will be? Okay, no more fuss, $userEname = null at this time. If you use include to include b.php, you can avoid the problem of $userEname being empty. Peng reminded me of this.


For more detailed explanations of header jump and include inclusion issues, please pay attention to the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn