我在CI curl请求失败时尝试检索错误。但是,我似乎无法让$this->curl->error_code
或$this->curl->error_string
输出任何数据。我正在尝试向API发出请求,我正在破坏URL以强制发生错误。
$api_url = "http://breamkebreakmedfd.com";
$this->curl->create($api_url);
$this->curl->execute();
echo($this->curl->error_string);
当我回应错误时,我没有收到任何错误。