HttpMessage
PHP 手册

HttpMessage::setHeaders

(PECL pecl_http >= 0.10.0)

HttpMessage::setHeadersSet headers

说明

public void HttpMessage::setHeaders ( array $headers )

Sets new headers.

参数

headers

associative array containing the new HTTP headers, which will replace all previous HTTP headers of the message


HttpMessage
PHP 手册