利用吉大港山区用户类别帮助发送申请。 现有几处,但我创建了一个网站()。 我可以帮助你。
<>提出PUT请求:
<?php
require_once Http/Client.php ;
require_once Http/Method.php ;
require_once Http/PUT.php ;
require_once Http/Request.php ;
require_once Http/Response.php ;
require_once Http/Uri.php ;
use HttpRequest;
use HttpResponse;
header( Content-type:text/plain );
$client = new HttpClient();
//GET request
echo $client->send(
Request::create()
->setMethod(new HttpPUT())
->setUri(new HttpUri( http://localhost/linetime/user/1 ))
->setParameter( a , hello )
)->getBody();
?>
www.un.org/Depts/DGACM/index_spanish.htm PUT申请的处理:
//simply print out what was sent:
switch($_SERVER[ REQUEST_METHOD ]) {
case PUT :
echo file_get_contents( php://input );
break;
}
Note that I have an autoloader on my projects that willload all those including for me, but You may consider make a file that will include all if You ttim to godown that Line.
http://www.ohchr.org。
//initialization code goes here
$requestBody = http_build_query(
array( a => hello ),
,
&
);
$fh = fopen( php://memory , rw );
fwrite($fh, $requestBody);
rewind($fh);
curl_setopt($this->curl, CURLOPT_INFILE, $fh);
curl_setopt($this->curl, CURLOPT_INFILESIZE, strlen($requestBody));
curl_setopt($this->curl, CURLOPT_PUT, true);
//send request here
fclose($fh);
请注意,您使用一个流来发送数据。