The HttpRequest
PHP Manual

HttpRequest::addHeaders

(PECL pecl_http >= 0.10.0)

HttpRequest::addHeadersAdd headers

说明

public bool HttpRequest::addHeaders ( array $headers )

Add request header name/value pairs.

参数

headers

an associative array as parameter containing additional header name/value pairs

返回值

成功时返回 TRUE, 或者在失败时返回 FALSE.


The HttpRequest
PHP Manual