📜  php curl 删除请求 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:00.605000             🧑  作者: Mango

代码示例1
public function curl_delete($url)
{
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
    $result = curl_exec($ch);
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);
    return $result;
}