«

PHP:curl_multi_setopt()的用法

时间:2024-3-1 21:52     作者:韩俊     分类: PHP


curl_multi_setopt

(PHP 5 >= 5.5.0)

curl_multi_setopt — Set an option for the cURL multi handle

说明

bool curl_multi_setopt
( resource $mh
, int $option
, mixed $value
)

Warning

本函数还未编写文档,仅有参数列表。

参数

mh

option

One of the CURLMOPT_* constants.

value

The value to be set on option.

  <p>
   <code>value</code> should be an int for the
   following values of the <code>option</code> parameter:
       Option
       Set <code>value</code> to
       <strong><code>CURLMOPT_PIPELINING</code></strong>
        Pass 1 to enable or 0 to disable. Enabling pipelining on a multi
        handle will make it attempt to perform HTTP Pipelining as far as
        possible for transfers using this handle. This means that if you add
        a second request that can use an already existing connection, the
        second request will be &quot;piped&quot; on the same connection rather than
        being executed in parallel.
       <strong><code>CURLMOPT_MAXCONNECTS</code></strong>
        Pass a number that will be used as the maximum amount of
        simultaneously open connections that libcurl may cache. Default is
        10. When the cache is full, curl closes the oldest one in the cache
        to prevent the number of open connections from increasing.
  </p>

返回值

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

标签: php php教程

热门推荐