1
我想要use this Google Analytics API tutori al,但它依賴於Guzzle。而我得到這個錯誤:'GuzzleHttp Collection'找不到
Fatal error: Class 'GuzzleHttp\Collection' not found in ../google-api-php-client/src/Google/Client.php on line 93
但我已經安裝了狂飲:
>>php composer.phar require guzzlehttp/guzzle:~5.2
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing react/promise (v2.2.1)
Downloading: 100%
- Installing guzzlehttp/streams (3.0.0)
Downloading: 100%
- Installing guzzlehttp/ringphp (1.1.0)
Downloading: 100%
- Installing guzzlehttp/guzzle (5.3.0)
Downloading: 100%
Writing lock file
Generating autoload files
這是我composer.json:
"require": {
"php": ">=5.4",
"google/auth": "v0.3",
"monolog/monolog": "^1.17",
"phpseclib/phpseclib": "~2.0",
"guzzlehttp/guzzle": "5.3.*"
},
谷歌分析庫有它自己的'composer.json'文件。你嘗試過運行'composer install'嗎? –
是的,這位作曲家是我在這個問題上展示的作曲家。是的,我試過了,它顯示了幾個命令。 –
你是否包含作曲家生成的autoload php文件? –