Php 供应商自动加载在本地主机上运行,不在EB上运行

Php 供应商自动加载在本地主机上运行,不在EB上运行,php,amazon-web-services,amazon-elastic-beanstalk,Php,Amazon Web Services,Amazon Elastic Beanstalk,我一直在本地网站上测试tumblr库,一切正常。但是,在上传到AWS时,我收到以下错误: Fatal error: Class 'Tumblr\API\Client' not found in /var/app/current/tumblr.php on line 15 使用以下代码: <?php ini_set('display_errors',1); ini_set('display_startup_errors',1); error_reporting(-1); require

我一直在本地网站上测试tumblr库,一切正常。但是,在上传到AWS时,我收到以下错误:

Fatal error: Class 'Tumblr\API\Client' not found in /var/app/current/tumblr.php on line 15
使用以下代码:

<?php

ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);

require 'vendor/autoload.php';
include('dbcon.php');

use Tumblr\API;

$consumerKey = 'xxxxxxxxxxx';
$consumerSecret = 'xxxxxxxxxxx';

$client = new Tumblr\API\Client(
  $consumerKey,
  $consumerSecret,
  'xxxxxxxxxx',
  'xxxxxxxxxx'
);

看起来您尚未将“供应商”目录上载到AWS。确保它已被传输,并且在本地计算机上的操作系统上位于同一位置。我刚刚检查,供应商文件未正确上载,但所有其他文件都已上载,为什么会发生这种情况?如果未提交,则会发生这种情况…查看后,其中一个自动加载库包括一个
.gitignore
文件,阻止提交所有其他库。