mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 05:26:57 +08:00
124 lines
4.0 KiB
HTML
124 lines
4.0 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||
<title>为 cURL 并行处理设置一个选项</title>
|
||
</head>
|
||
<body class="docs"><div id="layout">
|
||
<div id="layout-content"><div id="function.curl-multi-setopt" class="refentry">
|
||
<div class="refnamediv">
|
||
<h1 class="refname">curl_multi_setopt</h1>
|
||
<p class="verinfo">(PHP 5 >= 5.5.0, PHP 7)</p><p class="refpurpose"><span class="refname">curl_multi_setopt</span> — <span class="dc-title">为 cURL 并行处理设置一个选项</span></p>
|
||
|
||
</div>
|
||
|
||
<div class="refsect1 description" id="refsect1-function.curl-multi-setopt-description">
|
||
<h3 class="title">说明</h3>
|
||
<div class="methodsynopsis dc-description">
|
||
<span class="methodname"><strong>curl_multi_setopt</strong></span>
|
||
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$mh</code></span>
|
||
, <span class="methodparam"><span class="type">int</span> <code class="parameter">$option</code></span>
|
||
, <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>
|
||
) : <span class="type">bool</span></div>
|
||
|
||
<p class="para rdfs-comment">
|
||
|
||
</p>
|
||
|
||
<div class="warning"><strong class="warning">Warning</strong><p class="simpara">本函数还未编写文档,仅有参数列表。</p></div>
|
||
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 parameters" id="refsect1-function.curl-multi-setopt-parameters">
|
||
<h3 class="title">参数</h3>
|
||
<dl>
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">mh</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">option</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
常量 <strong><code>CURLMOPT_*</code></strong> 之一。
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">value</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
将要设置给 <code class="parameter">option</code> 的值。
|
||
</p>
|
||
<p class="para">
|
||
在 <code class="parameter">option</code> 参数为下列值时 <code class="parameter">value</code> 需要为 <span class="type"><a href="language.types.integer.html" class="type int">int</a></span> 类型:
|
||
<table class="doctable informaltable">
|
||
|
||
<thead>
|
||
<tr>
|
||
<th>Option 的值</th>
|
||
<th>将 <code class="parameter">value</code> 设为</th>
|
||
</tr>
|
||
|
||
</thead>
|
||
|
||
<tbody class="tbody">
|
||
<tr>
|
||
<td style="vertical-align: top;"><strong><code>CURLMOPT_PIPELINING</code></strong></td>
|
||
<td style="vertical-align: top;">
|
||
传入 1 来启用或 0 来禁用。 在并行处理时启用管道模式
|
||
将会尽可能地使用管线化的 HTTP (译注:HTTP长连接)来
|
||
传输,这意味着如果你提交第二个请求,这个请求将会使用
|
||
已经存在的链接,第二个请求将会被送入同一个链接的“管
|
||
道”中。
|
||
</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td style="vertical-align: top;"><strong><code>CURLMOPT_MAXCONNECTS</code></strong></td>
|
||
<td style="vertical-align: top;">
|
||
传入一个数字来指定 libcurl 可以同时缓存的活跃链接的数量。默认值为
|
||
10。当缓存写满时, lincurl 将关闭较早创建的链接来创建新的链接。
|
||
</td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
|
||
</table>
|
||
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
</dl>
|
||
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 returnvalues" id="refsect1-function.curl-multi-setopt-returnvalues">
|
||
<h3 class="title">返回值</h3>
|
||
<p class="para">
|
||
成功时返回 <strong><code>TRUE</code></strong>, 或者在失败时返回 <strong><code>FALSE</code></strong>。
|
||
</p>
|
||
</div>
|
||
|
||
|
||
|
||
</div></div></div></body></html> |