Problems encountered in a project, when the user login success, with header jump to the home page, has been wrong, can not jump to the page you want. Finally Niang for a long time to find solutions, here to share to everyone.
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
?
| 1 2 3 4 5 6 7 |
$userEname = "Crystal"; $userCname = "Chengcheng"; Your .... Header ("location:b.php"), which is the code of ..... headers ("the" ")". Your code ... .......... |
If you quote $userename in the b.php file, what do you think is the result? $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.