当PHP curl_setopt_数组';这是假的吗?
代码:当PHP curl_setopt_数组';这是假的吗?,php,curl,Php,Curl,代码: 我需要弄清楚这些卷曲选项出了什么问题。如何调试curl\u setopt\u array()本身?由于cookiejar是一个(经过测试的)工作文件名,url是正确的,header函数正在工作,并且每个其他选项都是硬编码的,我应该做些什么来深入挖掘呢?调试时应该使用复数curl\u setopt而不是单数curl\u setopt\u array <?php $this->curlHandle = curl_init(); $curl_options = $th
我需要弄清楚这些卷曲选项出了什么问题。如何调试
curl\u setopt\u array()
本身?由于cookiejar是一个(经过测试的)工作文件名,url是正确的,header函数正在工作,并且每个其他选项都是硬编码的,我应该做些什么来深入挖掘呢?调试时应该使用复数curl\u setopt
而不是单数curl\u setopt\u array
<?php
$this->curlHandle = curl_init();
$curl_options = $this->additionalCurlOptions + array(
CURLOPT_COOKIEJAR => $this->cookieFile,
CURLOPT_URL => $base_url,
CURLOPT_FOLLOWLOCATION => TRUE,
CURLOPT_MAXREDIRS => 5,
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_SSL_VERIFYPEER => FALSE, // Required to make the tests run on https.
CURLOPT_SSL_VERIFYHOST => FALSE, // Required to make the tests run on https.
CURLOPT_HEADERFUNCTION => array(&$this, 'curlHeaderCallback'),
);
if (isset($this->httpauth_credentials)) {
$curl_options[CURLOPT_USERPWD] = $this->httpauth_credentials;
}
// curl_setopt_array() returns FALSE if any of the specified options
// cannot be set, and stops processing any further options.
$result = curl_setopt_array($this->curlHandle, $this->additionalCurlOptions + $curl_options);
?>