您好我正在嘗試使用google + rest API獲取配置文件數據,但是,我得到此錯誤:cURL錯誤60:請參閱http://curl.haxx.se/libcurl/c/libcurl-errors.html
Fatal error: Uncaught exception 'GuzzleHttp\Ring\Exception\RingException' with message 'cURL error 60: See http://curl.haxx.se/libcurl/c/libcurl-errors.html ' in C:\wamp\www\plus3\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php on line 51
Here是錯誤屏幕截圖。
目前,我在本地主機上工作。我已經嘗試了所有包括 安裝composer,curl等等的東西。不知道是什麼,我做錯了。爲什麼不能從配置文件中獲取數據。
下面是代碼:
<?php
include_once __DIR__ . '/../vendor/autoload.php';
include_once "templates/base.php";
session_start();
$client = new Google_Client();
$client = new Google_Client();
$client->setApplicationName("Google+ PHP Starter Application");
// credentials are intentionally not disclosed but they are correct.
$client->setClientId('XXXXXX');
$client->setClientSecret('XXXXXXX');
$client->setRedirectUri('http://localhost/....');
$client->setDeveloperKey('XXXXX');
$plus = new Google_Service_Plus($client);
//Everything works fine before this line...as soon as i write the line
//below to fetch results with name brett...it throws me an error.
$results = $plus->people->search('brett');
?>
<!doctype html>
<html>
<head><link rel='stylesheet' href='style.css' /></head>
<body>
<header><h1>Google+ Sample App</h1></header>
</body>
</html>
你看錯了嗎? – TZHX
我做了...我認爲它與捲曲有關...我確實安裝了它...有無論如何我可以仔細檢查? –