xxxx日本护士丰满hd|亚洲av日韩av无码av欧美av|精品国产污污网站在线看免费|日日摸日日碰夜夜爽久久|国产一区二区亚洲精品

SoapClient::__setSoapHeaders

(PHP 5 >= 5.0.5, PHP 7, PHP 8)

SoapClient::__setSoapHeadersSets SOAP headers for subsequent calls

說(shuō)明

public SoapClient::__setSoapHeaders(SoapHeader|array|null $headers = null): bool

Defines headers to be sent along with the SOAP requests.

注意:

Calling this method will replace any previous values.

參數

headers

The headers to be set. It could be SoapHeader object or array of SoapHeader objects. If not specified or set to null, the headers will be deleted.

返回值

成功時(shí)返回 true, 或者在失敗時(shí)返回 false。

范例

示例 #1 SoapClient::__setSoapHeaders() example

<?php

$client 
= new SoapClient(null, array('location' => "http://localhost/soap.php",
                                     
'uri'      => "http://test-uri/"));
$header = new SoapHeader('http://soapinterop.org/echoheader/'
                            
'echoMeStringRequest',
                            
'hello world');

$client->__setSoapHeaders($header);

$client->__soapCall("echoVoid"null);
?>

示例 #2 Set Multiple Headers

<?php

$client 
= new SoapClient(null, array('location' => "http://localhost/soap.php",
                                     
'uri'      => "http://test-uri/"));
$headers = array();

$headers[] = new SoapHeader('http://soapinterop.org/echoheader/'
                            
'echoMeStringRequest',
                            
'hello world');

$headers[] = new SoapHeader('http://soapinterop.org/echoheader/'
                            
'echoMeStringRequest',
                            
'hello world again');

$client->__setSoapHeaders($headers);

$client->__soapCall("echoVoid"null);
?>

xxxx日本护士丰满hd|亚洲av日韩av无码av欧美av|精品国产污污网站在线看免费|日日摸日日碰夜夜爽久久|国产一区二区亚洲精品