|
4250 | 4250 | </term>
|
4251 | 4251 | <listitem>
|
4252 | 4252 | <para>
|
4253 |
| - A <type>callable</type> with the following signature that gets called after the |
4254 |
| - connection is established, but before the request payload (for example, the |
4255 |
| - GET/POST/DELETE request of an HTTP connection) is sent, and can be used to abort |
4256 |
| - or allow the connection depending on the source and destination IP address and |
4257 |
| - port numbers: |
| 4253 | + 具有以下签名的 <type>callable</type>,在建立连接之后但在发送请求负载(例如,HTTP 连接的 |
| 4254 | + GET/POST/DELETE 请求)之前调用,可用于根据源和目标 IP 地址和端口号中止或允许连接: |
4258 | 4255 | <methodsynopsis>
|
4259 | 4256 | <type>int</type><methodname><replaceable>callback</replaceable></methodname>
|
4260 | 4257 | <methodparam><type>CurlHandle</type><parameter>curlHandle</parameter></methodparam>
|
|
4268 | 4265 | <term><parameter>curlHandle</parameter></term>
|
4269 | 4266 | <listitem>
|
4270 | 4267 | <simpara>
|
4271 |
| - The cURL handle. |
| 4268 | + cURL 句柄。 |
4272 | 4269 | </simpara>
|
4273 | 4270 | </listitem>
|
4274 | 4271 | </varlistentry>
|
4275 | 4272 | <varlistentry>
|
4276 | 4273 | <term><parameter>destination_ip</parameter></term>
|
4277 | 4274 | <listitem>
|
4278 | 4275 | <simpara>
|
4279 |
| - The primary IP of the remote server established with this connection. |
4280 |
| - For <acronym>FTP</acronym>, this is the IP for the control connection. |
4281 |
| - IPv6 addresses are represented without surrounding brackets. |
| 4276 | + 使用此连接建立的远程服务器的主 IP。对于 <acronym>FTP</acronym>,这是控制连接的 IP。IPv6 地址不带括号。 |
4282 | 4277 | </simpara>
|
4283 | 4278 | </listitem>
|
4284 | 4279 | </varlistentry>
|
4285 | 4280 | <varlistentry>
|
4286 | 4281 | <term><parameter>local_ip</parameter></term>
|
4287 | 4282 | <listitem>
|
4288 | 4283 | <simpara>
|
4289 |
| - The originating IP for this connection. |
4290 |
| - IPv6 addresses are represented without surrounding brackets. |
| 4284 | + 此连接的原始 IP。IPv6 地址不带括号。 |
4291 | 4285 | </simpara>
|
4292 | 4286 | </listitem>
|
4293 | 4287 | </varlistentry>
|
4294 | 4288 | <varlistentry>
|
4295 | 4289 | <term><parameter>destination_port</parameter></term>
|
4296 | 4290 | <listitem>
|
4297 | 4291 | <simpara>
|
4298 |
| - The primary port number on the remote server established with this connection. |
4299 |
| - For <acronym>FTP</acronym>, this is the port for the control connection. |
4300 |
| - This can be a <acronym>TCP</acronym> or a <acronym>UDP</acronym> port number depending on the protocol. |
| 4292 | + 使用此连接建立的远程服务器上的主端口号。对于 <acronym>FTP</acronym>,这是控制连接的端口。根据协议的不同,这可能是 |
| 4293 | + <acronym>TCP</acronym> 或 <acronym>UDP</acronym> 端口号。 |
4301 | 4294 | </simpara>
|
4302 | 4295 | </listitem>
|
4303 | 4296 | </varlistentry>
|
4304 | 4297 | <varlistentry>
|
4305 | 4298 | <term><parameter>local_port</parameter></term>
|
4306 | 4299 | <listitem>
|
4307 | 4300 | <simpara>
|
4308 |
| - The originating port number for this connection. |
4309 |
| - This can be a <acronym>TCP</acronym> or a <acronym>UDP</acronym> port number depending on the protocol. |
| 4301 | + 此连接的发起端口号。根据协议的不同,这可能是 <acronym>TCP</acronym> 或 <acronym>UDP</acronym> 端口号。 |
4310 | 4302 | </simpara>
|
4311 | 4303 | </listitem>
|
4312 | 4304 | </varlistentry>
|
4313 | 4305 | </variablelist>
|
4314 |
| - Return <constant>CURL_PREREQFUNC_OK</constant> to allow the request, or |
4315 |
| - <constant>CURL_PREREQFUNC_ABORT</constant> to abort the transfer. |
4316 |
| - Available as of PHP 8.4.0 and cURL 7.80.0. |
| 4306 | + 返回 <constant>CURL_PREREQFUNC_OK</constant> 以允许请求,或返回 <constant>CURL_PREREQFUNC_ABORT</constant> |
| 4307 | + 以中止传输。自 PHP 8.4.0 和 cURL 7.80.0 起可用。 |
4317 | 4308 | </para>
|
4318 | 4309 | </listitem>
|
4319 | 4310 | </varlistentry>
|
|
4324 | 4315 | </term>
|
4325 | 4316 | <listitem>
|
4326 | 4317 | <para>
|
4327 |
| - Available as of PHP 8.4.0. |
4328 |
| - This option requires <constant>CURLOPT_VERBOSE</constant> option enabled. |
4329 |
| - A <type>callable</type> to replace the standard cURL verbose output. |
4330 |
| - This callback gets called during various stages of the request with verbose debug information. |
4331 |
| - The callback should match the following signature: |
| 4318 | + 自 PHP 8.4.0 起可用。此选项需要启用 <constant>CURLOPT_VERBOSE</constant> 选项。<type>callable</type> |
| 4319 | + 来替换标准 cURL 详细输出。此回调在请求的各个阶段使用详细调试信息进行调用。回调应与以下签名匹配: |
4332 | 4320 | <methodsynopsis>
|
4333 | 4321 | <type>void</type><methodname><replaceable>callback</replaceable></methodname>
|
4334 | 4322 | <methodparam><type>CurlHandle</type><parameter>curlHandle</parameter></methodparam>
|
|
4340 | 4328 | <term><parameter>curlHandle</parameter></term>
|
4341 | 4329 | <listitem>
|
4342 | 4330 | <simpara>
|
4343 |
| - The cURL handle. |
| 4331 | + cURL 句柄。 |
4344 | 4332 | </simpara>
|
4345 | 4333 | </listitem>
|
4346 | 4334 | </varlistentry>
|
4347 | 4335 | <varlistentry>
|
4348 | 4336 | <term><parameter>type</parameter></term>
|
4349 | 4337 | <listitem>
|
4350 | 4338 | <simpara>
|
4351 |
| - One of the following constants indicating the type of the <parameter>data</parameter> value: |
| 4339 | + 下列常量之一表示 <parameter>data</parameter> 值的类型: |
4352 | 4340 | </simpara>
|
4353 | 4341 | <variablelist xml:id="constant.curl-debugfunction.constants" role="constant_list">
|
4354 | 4342 | <varlistentry xml:id="constant.curlinfo-text">
|
|
4358 | 4346 | </term>
|
4359 | 4347 | <listitem>
|
4360 | 4348 | <simpara>
|
4361 |
| - Informational text. |
| 4349 | + 信息文本。 |
4362 | 4350 | </simpara>
|
4363 | 4351 | </listitem>
|
4364 | 4352 | </varlistentry>
|
|
4369 | 4357 | </term>
|
4370 | 4358 | <listitem>
|
4371 | 4359 | <simpara>
|
4372 |
| - Header (or header-like) data received from the peer. |
| 4360 | + 从对等方接受的 header(或者类似 header)值。 |
4373 | 4361 | </simpara>
|
4374 | 4362 | </listitem>
|
4375 | 4363 | </varlistentry>
|
|
4391 | 4379 | </term>
|
4392 | 4380 | <listitem>
|
4393 | 4381 | <simpara>
|
4394 |
| - Unprocessed protocol data received from the peer. |
4395 |
| - Even if the data is encoded or compressed, it is not provided decoded nor decompressed to this callback. |
| 4382 | + 从对等方接收到的未处理协议数据。即使数据已编码或压缩,也不会向此回调提供解码或解压缩后的数据。 |
4396 | 4383 | </simpara>
|
4397 | 4384 | </listitem>
|
4398 | 4385 | </varlistentry>
|
|
4403 | 4390 | </term>
|
4404 | 4391 | <listitem>
|
4405 | 4392 | <simpara>
|
4406 |
| - Protocol data sent to the peer. |
| 4393 | + 发送给对等方的协议数据。 |
4407 | 4394 | </simpara>
|
4408 | 4395 | </listitem>
|
4409 | 4396 | </varlistentry>
|
|
4414 | 4401 | </term>
|
4415 | 4402 | <listitem>
|
4416 | 4403 | <simpara>
|
4417 |
| - <acronym>SSL</acronym>/<acronym>TLS</acronym> (binary) data received from the peer. |
| 4404 | + 从对等方接收的 <acronym>SSL</acronym>/<acronym>TLS</acronym>(二进制)数据。 |
4418 | 4405 | </simpara>
|
4419 | 4406 | </listitem>
|
4420 | 4407 | </varlistentry>
|
|
4425 | 4412 | </term>
|
4426 | 4413 | <listitem>
|
4427 | 4414 | <simpara>
|
4428 |
| - <acronym>SSL</acronym>/<acronym>TLS</acronym> (binary) data sent to the peer. |
| 4415 | + 发送给对等方的 <acronym>SSL</acronym>/<acronym>TLS</acronym>(二进制)数据。 |
4429 | 4416 | </simpara>
|
4430 | 4417 | </listitem>
|
4431 | 4418 | </varlistentry>
|
|
4436 | 4423 | <term><parameter>data</parameter></term>
|
4437 | 4424 | <listitem>
|
4438 | 4425 | <simpara>
|
4439 |
| - Verbose debug data of the type indicate by the <parameter>type</parameter> parameter. |
| 4426 | + <parameter>type</parameter> 参数表示的类型的详细调试数据。 |
4440 | 4427 | </simpara>
|
4441 | 4428 | </listitem>
|
4442 | 4429 | </varlistentry>
|
|
0 commit comments