leancloud / php-sdk

LeanCloud PHP SDK
Apache License 2.0
53 stars 23 forks source link

快速入门的那几个例子都用不了, #75

Closed 92000 closed 8 years ago

92000 commented 8 years ago

LeanCloud\LeanClient::get("/date"); // 获取服务器时间 第一个就报错。

Fatal error: Uncaught exception 'RuntimeException' with message 'CURL connection (https://api.leancloud.cn/1.1/date) error: 60 60' in D:\phpStudy\WWW\phpproject\Vendor\src\LeanCloud\LeanClient.php:324 Stack trace: #0 D:\phpStudy\WWW\phpproject\Vendor\src\LeanCloud\LeanClient.php(354): LeanCloud\LeanClient::request('GET', '/date', NULL, NULL, Array, NULL) #1 D:\phpStudy\WWW\phpproject\index.php(6): LeanCloud\LeanClient::get('/date') #2 {main} thrown in D:\phpStudy\WWW\phpproject\Vendor\src\LeanCloud\LeanClient.php on line 324

然后下面的那些也报错 Fatal error: Uncaught exception 'RuntimeException' with message 'CURL connection (https://api.leancloud.cn/1.1/batch) error: 60 60' in D:\phpStudy\WWW\phpproject\Vendor\src\LeanCloud\LeanClient.php:324 Stack trace: #0 D:\phpStudy\WWW\phpproject\Vendor\src\LeanCloud\LeanClient.php(371): LeanCloud\LeanClient::request('POST', '/batch', Array, NULL, Array, NULL) #1 D:\phpStudy\WWW\phpproject\Vendor\src\LeanCloud\LeanClient.php(423): LeanCloud\LeanClient::post('/batch', Array, NULL, Array, NULL) #2 D:\phpStudy\WWW\phpproject\Vendor\src\LeanCloud\LeanObject.php(644): LeanCloud\LeanClient::batch(Array, NULL) #3 D:\phpStudy\WWW\phpproject\Vendor\src\LeanCloud\LeanObject.php(595): LeanCloud\LeanObject::batchSave(Array) #4 D:\phpStudy\WWW\phpproject\Vendor\src\LeanCloud\LeanObject.php(357): LeanCloud\LeanObject::saveAll(Array) #5 D:\phpStudy\WWW\phpproject\list.php(17): LeanCloud\LeanObject->save() #6 {main} thrown in D:\phpStudy\WWW\phpproject\Vendor\src\LeanCloud\LeanClient.php on line 324

要怎么才能读取时间呢?

jysperm commented 8 years ago

系 Windows 下 curl 的根证书不全,见 https://github.com/leancloud/php-sdk/issues/28

92000 commented 8 years ago

谢谢,已经处理好了