Home >Backend Development >PHP Tutorial >Header jump in php uses include inclusion to solve the problem of missing parameters, headerinclude_PHP tutorial
Some colleagues reported that overseas registration of several recently launched games cannot load style files and needs urgent repair. .
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 judgment position of game_id was advanced, 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 = "程程"; //your code ................................ header("location:b.php"); //your code ..................
If $userEname is referenced in the b.php file, what do you think the result will be? $userEname = null at this time. If you use include to include b.php, you can avoid the problem of $userEname being empty.
The above is the entire content of this article, I hope you all like it.