php中header是什么意思Http协议中的Header与Body Http协议中的Header与Body
Header的每⾏最后要加\r\n
Header与Body之间要⽤\r\n隔开
Body后⽆需加\r\n
ACSII码中
'\n' 10 换⾏
'\r' 13 回车
也可以表⽰为'\x0a'和'\x0d'.(16进制)
⽰例:HTTP开始部分为header,<html>部分为body。
HTTP/1.1 200 OK\r\n
Content-Encoding: gzip\r\n
Content-Type: text/xml\r\n
Content-Length: 399\r\n
Connection: keep-alive\r\n
X-Varnish-Cache: HIT\r\n
X-Varnish-Cache-Hits: 1241\r\n
\r\n
&</html>
原⽂:

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。