Home > Article > Backend Development > Summary of several issues to pay attention to when using PHP Header for page jump_PHP Tutorial
1. There cannot be a space between location and ":", otherwise an error will occur.
2. There cannot be any output before using the header.
3. The PHP code after the header will also be executed.
The following is a comparison with response.redirect in asp:
Example 1:
response.redirect "../test.asp"
header("location:../test.php ");
The difference between the two:
asp's redirect function can work after sending the header file to the client.
For example,