我正尝试在网站点 http://www.sitepoint.com/guzzle-php-http-client/ 上跟进本教程,我这里是一步步安装的http://docs.guzzlephp.org/en/latest/overview.html#installation我正在尝试运行第一个简单示例,但它给了我问题。我还检查了我的 PHP 版本要求(5.5):我的是 5.6,所以没问题。
我正在使用 MAC,请参阅下面的代码。
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once 'vendor/autoload.php';
use Guzzle\Http\Client;
use Guzzle\Http\EntityBody;
use Guzzle\Http\Message\Request;
use Guzzle\Http\Message\Response;
$client = new Client("https://qrng.anu.edu.au");
$request = $client->get('/API/jsonI.php?length=10&type=uint8');
$response = $request->send();
echo $body = $response->getBody(true);
拜托,我错过了什么?
最佳答案
关于php - 找不到类 'Guzzle\Http\Client',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34941668/