Home > Backend Development > PHP Tutorial > PHP中header和session_start前不能有输出原因分析_php技巧

PHP中header和session_start前不能有输出原因分析_php技巧

WBOY
Release: 2016-05-17 09:07:22
Original
956 people have browsed it

在http传输文本中,规定必须 header和content顺序必须是:header在前content在后,并且header的格式必须满足“keyword: value\n”这种格式。

1、在header输出之前有输出内容的话,就会造成对header的错误理解(尽管现在已经能容错了),例如不是满足“keyword: value\n”的格式还好,直接错误了,但是满足“keyword: value\n”这个格式以后,客户端是否安装错误理解,还是按照正确理解?

2、session开启是会隐含的触发是否用header(“Set-Cookie: sid=xxxxxx”),也就是其实还是一个隐式的header调用

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template