我在 Magento 中安装模块和扩展时遇到问题。这是失败的代码:
$uriModified = $this->getModifiedUri($uri, $https);
$this->_ch = curl_init();
$this->curlOption(CURLOPT_URL, $uriModified);
$this->curlOption(CURLOPT_SSL_VERIFYPEER, false);
$this->curlOption(CURLOPT_SSL_CIPHER_LIST, 'TLSv1');
T, 'TLSv1');$this->getCurlMethodSettings($method, $params, $isAuthorizationRequired);
if(count($this->_headers)) {
$heads = array();
foreach($this->_headers as $k=>$v) {
$heads[] = $k.': '.$v;
}
$this->curlOption(CURLOPT_HTTPHEADER, $heads);
}
我收到此错误:
解析错误:语法错误,意外的“,”
在这一行:
T, 'TLSv1');$this->getCurlMethodSettings($method, $params, $isAuthorizationRequired);
答案1
您所说的失败的行看起来像是重复了上一行的末尾。这部分:
T, 'TLSv1');
是上一行的结尾:
$this->curlOption(CURLOPT_SSL_CIPHER_LIST, 'TLSv1');
我希望您复制/粘贴了错误的内容,并且可以删除该部分,留下:
$this->getCurlMethodSettings($method, $params, $isAuthorizationRequired);