【问题标题】:Missing vendor/autoload.php in google-api-php-client-mastergoogle-api-php-client-master 中缺少 vendor/autoload.php
【发布时间】: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);

【问题讨论】:

标签: php composer-php google-calendar-api


【解决方案1】:

您需要从https://github.com/google/google-api-php-client/releases 下载文件夹/版本,而不是 https://github.com/google/google-api-php-client.

安装指南在这里让您了解这一点:

如果你讨厌使用 composer,你可以下载整个包。 Releases 页面列出了所有稳定版本。

我犯了同样的错误,但使用发布页面上的最新稳定版本修复了它。

【讨论】:

    【解决方案2】:

    使用 composer 和命令“composer require google/apiclient:^2.0”来安装包

    https://github.com/google/google-api-php-client/releases发布任何版本

    但是直接从https://github.com/google/google-api-php-client(google-api-php-client-master.zip)下载找不到包供应商,使用以上两种方式中的任何一种,一定要有快速入门,你会需要指导https://developers.google.com/google-apps/calendar/quickstart/php

    【讨论】:

      猜你喜欢
      • 2016-01-30
      • 2015-12-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-20
      • 1970-01-01
      • 1970-01-01
      • 2015-12-11
      相关资源
      最近更新 更多