PHP can not have any output before the header and Session_Start: in the HTTP transmission text, the header and the content order must be: header in the previous content after The reason why PHP cannot have any output before headers and session_start is that in HTTP transmission text, the header and content order must be: the header is in front of the content, and the format of the header must meet the "keyword:value\n" format. 1, in the header output before the output, it will cause the wrong understanding of the header (although now can be fault-tolerant), such as not to meet the "keyword:value\n" format is OK, direct error, but to meet the "keyword:value\n" After this format, does the client install the wrong understanding, or follow the correct understanding? 2, session Open is the implied trigger whether to use the header ("Set-cookie:sid=xxxxxx"), that is, in fact, an implicit header call. |