google-api-php-client-master中缺少vendor / autoload.php [英] Missing vendor/autoload.php in google-api-php-client-master
问题描述
在搜索 autoload.php
时,在google-api-php-client-master中没有类似于供应商的文件夹,我在 C上找到了它:\wamp\www\gapi\google-api-php-client-master\src\Google\autoload.php
There is no folder like vendor in google-api-php-client-master, while searching for autoload.php
I found it at C:\wamp\www\gapi\google-api-php-client-master\src\Google\autoload.php
在 Google\autoload.php
上查看源代码时,它再次请求 /vendor/autoload.php
在第21行,但没有文件夹名称供应商。
我还通过在 https://github.com/google/google-google-api-php-client
On viewing the source at Google\autoload.php
, its once again requesting for /vendor/autoload.php
at line 21 but no folder name vendor.
I have also include the full package by downloading the zip at https://github.com/google/google-api-php-client
大多数搜索都没有为我提供解决方案,但是我发现了很多与此主题相关的文章。有人帮助我。
Most of the search didn't provide me a solution, But I found lots of article on this topic. Some one help me on this.
错误:
严重错误:未捕获的异常异常 ,消息为必须通过作曲家或下载完整的
软件包安装此
库。请参阅
中的指令at_ _ _ C:\wamp\www\gapi\google-api-php-client-master\src\Google\autoload.php
第14行
Fatal error: Uncaught exception 'Exception' with message 'This library must be installed via composer or by downloading the full package. See the instructions at_ _ _' in C:\wamp\www\gapi\google-api-php-client-master\src\Google\autoload.php on line 14
文件内容(autoload.php):
$file = __DIR__ . '/../../vendor/autoload.php';
if (!file_exists($file)) {
$exception = 'This library must be installed via composer or by downloading the full package.';
$exception .= ' See the instructions at https://github.com/google/google-api-php-client#installation.';
throw new **Exception($exception);
推荐答案
您需要从 https://github.com/google/google-api-php-client/releases 而不是
https://github.com/google/google -api-php-client。
安装指南可让您了解以下信息:
The install guide lets you know about this here:
如果您讨厌使用作曲家,则可以下载完整的软件包。 发布页列出了所有稳定版本。
If you abhor using composer, you can download the package in its entirety. The Releases page lists all stable versions.
我犯了同样的错误,但是使用发布页面上的最新稳定版本进行了修复。
I did the same mistake, but fixed it by using the latest stable version from the release page.
这篇关于google-api-php-client-master中缺少vendor / autoload.php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!