它在localhost上工作得很好,但当我将它上传到服务器时,它开始向我显示该错误。我能做什么? 这是我的代码。
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => GATEWAY_URL . $method,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_POSTFIELDS => http_build_query($data),
CURLOPT_SSL_VERIFYHOST => false
));
$response = curl_exec($curl);
$output = curl_exec($curl);
if ($output === FALSE) {
echo 'cURL Error: ' . curl_error($curl);
}
$response = json_decode($response, true);
curl_close($curl);
return $response;