示例#1
0
 public function __construct($host, $port)
 {
     if (!extension_loaded('curl')) {
         throw new SagException('Sag cannot use cURL on this system: the PHP cURL extension is not installed.');
     }
     parent::__construct($host, $port);
     $this->ch = curl_init();
 }
 public function __construct($host, $port)
 {
     if (!extension_loaded('curl')) {
         throw new SagException('Sag cannot use cURL on this system: the PHP cURL extension is not installed.');
     }
     parent::__construct($host, $port);
     /*
      * PHP doesn't like it if you tell cURL to follow location headers when
      * open_basedir is set in PHP's configuration. Only check to see if it's
      * set once so we don't ini_get() on every request.
      */
     $this->followLocation = !ini_get('open_basedir');
     $this->ch = curl_init();
 }