【发布时间】:2016-11-30 12:55:00
【问题描述】:
google-api-php-client-master中没有vendor之类的文件夹,在搜索autoload.php时我在C:\wamp\www\gapi\google-api-php-client-master\src\Google\autoload.php找到了
在查看Google\autoload.php 的源代码时,它再次在第21 行请求/vendor/autoload.php,但没有文件夹名称供应商。
我还通过在https://github.com/google/google-api-php-client 下载 zip 包含完整包
大部分搜索都没有为我提供解决方案,但我找到了很多关于这个主题的文章。有人帮我解决这个问题。
错误:
致命错误:未捕获的异常 'Exception' 带有消息 'This 库必须通过作曲家安装或下载完整的 包裹。请参阅_ _ _' 中的说明 C:\wamp\www\gapi\google-api-php-client-master\src\Google\autoload.php 第 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);
【问题讨论】:
-
您可以通过getcomposer.org了解 Composer
-
你的项目有 composer.json 文件吗?你是如何安装这个组件的(google-api-php-client-master)?
-
我没有使用composer下载文件我从这个链接(github.com/google/google-api-php-client.git)下载了zip文件。
-
现在我从github.com/google/google-api-php-client/releases 下载了Release --> google-api-php-client-2.1.0.zip 得到错误 Parse error: syntax error, unexpected '[' in C:\ wamp\www\gapi\google-api-php-client-2.1.0\vendor\guzzlehttp\psr7\src\functions.php 在第 78 行
-
我正在尝试从 Google 日历中添加、更新和删除活动,因此通过 developers.google.com/google-apps/calendar/quickstart/php 的快速入门启动
标签: php composer-php google-calendar-api