本文整理汇总了PHP中Curl::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Curl::delete方法的具体用法?PHP Curl::delete怎么用?PHP Curl::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Curl
的用法示例。
在下文中一共展示了Curl::delete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete($resource, array $queryParams = array())
{
$url = $this->buildUrl($resource);
$curl = new Curl();
return $curl->delete($url, $queryParams);
}
示例2: delete
public function delete($path, $recursive = '')
{
$url = $this->_buildUrl($path, array('op' => 'DELETE', 'recursive' => $recursive));
return Curl::delete($url);
}
示例3: Curl
$url = 'http://localhost/~pandayak/curl/test.php';
if (isset($_GET['run'])) {
require 'curl.php';
$c = new Curl();
//test default behavior
$param = 'qwe';
$test = $c->get($url, array('param' => $param));
assert($param == $test);
$param = 'asd';
$test = $c->post($url, array('param' => $param));
assert($param == $test);
$param = 'zxc';
$test = $c->put($url, array('param' => $param));
assert($param == $test);
$param = '123';
$test = $c->delete($url, array('param' => $param));
assert($param == $test);
//test multi behavior w/ single requests
$param = 'qwe';
$test = $c->multi(array(array('get', $url, array('param' => $param))));
assert($param == $test[0]);
$param = 'asd';
$test = $c->multi(array(array('post', $url, array('param' => $param))));
assert($param == $test[0]);
$param = 'zxc';
$test = $c->multi(array(array('put', $url, array('param' => $param))));
assert($param == $test[0]);
$param = '123';
$test = $c->multi(array(array('delete', $url, array('param' => $param))));
assert($param == $test[0]);
//test multi requests w/ multiple requests