示例#1
0
文件: Curl.php 项目: brick/brick
 /**
  * @return string
  *
  * @throws CurlException
  */
 public function execute()
 {
     // This must always be set.
     $this->setOption(CURLOPT_RETURNTRANSFER, true);
     $result = curl_exec($this->curl);
     if ($result === false) {
         throw CurlException::error(curl_error($this->curl));
     }
     return $result;
 }