function.httpmessage-addheaders.html

来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 100 行

HTML
100
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Add headers</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="class.httpmessage.html">The HttpMessage class</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.httpmessage-construct.html">HttpMessage::__construct</a></div> <div class="up"><a href="class.httpmessage.html">The HttpMessage class</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.httpmessage-addheaders" class="refentry"> <div class="refnamediv">  <h1 class="refname">HttpMessage::addHeaders</h1>  <p class="verinfo">(PECL pecl_http:0.10.0-1.5.5)</p><p class="refpurpose"><span class="refname">HttpMessage::addHeaders</span> &mdash; <span class="dc-title">Add headers</span></p> </div> <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="modifier">public</span>   <span class="type"><span class="type void">void</span></span> <span class="methodname"><b><b>HttpMessage::addHeaders</b></b></span>    ( <span class="methodparam"><span class="type">array</span> <tt class="parameter">$headers</tt></span>   [, <span class="methodparam"><span class="type">bool</span> <tt class="parameter">$append = FALSE</tt></span>  ] )</div>  <p class="para rdfs-comment">   Add headers. If append is true, headers with the same name will be separated, else overwritten.  </p> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term"><i><tt class="parameter">headers</tt></i></span>     <dd>      <p class="para">       associative array containing the additional HTTP headers to add to the messages existing headers      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">append</tt></i></span>     <dd>      <p class="para">       if true, and a header with the same name of one to add exists already, this respective       header will be converted to an array containing both header values, otherwise       it will be overwritten with the new header value      </p>     </dd>    </dt>   </dl>  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">   Returns <b><tt>TRUE</tt></b> on success or <b><tt>FALSE</tt></b> on failure.  </p> </div>    </div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="class.httpmessage.html">The HttpMessage class</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.httpmessage-construct.html">HttpMessage::__construct</a></div> <div class="up"><a href="class.httpmessage.html">The HttpMessage class</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?