我一直在尝试查看来自 Twilio 的 SMS 消息,但收到错误消息。curl.cainfo
我在 php.info 中添加了一个新路径
curl.cainfo = c:\wamp\certs\cacert.pem
但我仍然遇到错误。
错误消息是:
Fatal error: Uncaught exception 'Services_Twilio_TinyHttpException' with message 'SSL certificate problem: self signed certificate in certificate chain' in C:MYPATH\twilio-php-master\twilio-php-master\Services\Twilio\TinyHttp.php on line 119
这是PHP代码:
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require ('C:/wamp/www/Services/Twilio.php'); // Loads the library
$sid = "Axxxxxxxxxxxxxxxxxxxxxxx9";
$token = "8xxxxxxxxxxxxxxxxxxxxxxx2";
$http = new Services_Twilio_TinyHttp(
'https://api.twilio.com',
array('curlopts' => array(
CURLOPT_SSL_VERIFYPEER => true,
CURLOPT_SSL_VERIFYHOST => 2,
)));
$client = new Services_Twilio($sid, $token, "2010-04-01", $http);
$sms = $client->account->sms_messages->create("+1480xxxxx", "+1520xxxxx", "HELP please?! I love you <3", array());
echo $sms->sid;
?>
我使用的是 Windows 8,并且 curl 版本:cURL Information 7.36.0
已启用
https://github.com/twilio/twilio-php/blob/master/docs/faq.rst
我应该更新我做错了什么中所述的卷曲吗?