The HttpRequest
PHP 手册

HttpRequest::setPostFields

(PECL pecl_http >= 0.10.0)

HttpRequest::setPostFieldsSet post fields

说明

public bool HttpRequest::setPostFields ( array $post_data )

Set the POST data entries, overwriting previously set POST data.

Affects only POST and custom requests.

参数

post_data

an associative array containing the post fields; if empty, the post data will be unset

返回值

如果成功则返回 TRUE,失败则返回 FALSE


The HttpRequest
PHP 手册