Home > Article > Backend Development > What should I do if the php header cannot be jumped?
Solution to the problem that php header cannot jump: 1. Delete the space between location and ":"; 2. Cancel the output before "header('Location:'.$url);"; 3. Exit after the header; 4. Cancel the reset and jump conflicts of the htaccess file.
Recommended: "PHP Video Tutorial"
PHP jump failed, header location is invalid
Solution
Check one by one:
0) There can be no space between location and ":"
1) Header('Location:'.$url); in front There cannot be any output, including various echoes, error reminders on the screen, and: various outputs of include files
2) The PHP code after the header will also be executed, so it needs to be after the header Exit
3) Check the reset and jump of the .htaccess file, don’t conflict
The above is the detailed content of What should I do if the php header cannot be jumped?. For more information, please follow other related articles on the PHP Chinese website!