致命错误:类'AWS \ ElasticTrans codeR \ ElasticTrans coderClient'没有发现在C:\瓦帕\的www \ sep24 \等\ S \ wr.php 5号线 [英] Fatal error: Class 'Aws\ElasticTranscoder\ElasticTranscoderClient' not found in C:\wamp\www\sep24\et\s\wr.php on line 5
问题描述
想跑从东部/ S / wr.php弹性transoder PHP code。 wr.php包含PHP跨codeR code。这是我的code。
Tried to run the elastic transoder php code from et/s/wr.php. wr.php contains the php transcoder code. Here is my code.
<?php
require 'vendor/autoload.php';
use Aws\ElasticTranscoder\ElasticTranscoderClient;
-------------
------------
?>
这是错误的时候,我从loaclhost运行。
This is the error when I'm running from the loaclhost.
致命错误:类'AWS \ ElasticTrans codeR \ ElasticTrans coderClient'不是位于C:\瓦帕\的www \ sep24 \等\ S \ wr.php第5行
Fatal error: Class 'Aws\ElasticTranscoder\ElasticTranscoderClient' not found in C:\wamp\www\sep24\et\s\wr.php on line 5
那么应该怎么做..?需要帮助..是的,我已经包括这是我从GIT下载的AWS文件夹。
So what should be done.. ? Need Help.. and yes i have included the AWS folder which i downloaded from GIT.
推荐答案
如果您通过作曲取包,那么你会发现
If you fetch the package via Composer, then you will find
- (一)你的包在供应商的文件夹(
厂商\ AWS \ AWS-SDK-PHP的\ src \ ElasticTrans codeR
)和 - (二)在供应商的文件夹,命名为
autoload.php
的顶级自动载入的文件。
- (a) your package in the vendor folder (
vendor\aws\aws-sdk-php\src\ElasticTranscoder
) and - (b) an autoloading file at the top level of the vendor folder, named
autoload.php
.
您需要加载该文件。这使得作曲家磁带自动加载机安装它的所有类。
You need to load this file. This enables the Composer Autoloader for all classes installed by it.
<?php
require 'vendor/autoload.php';
或与code:
Or with your code:
<?php
require 'vendor/autoload.php';
use Aws\ElasticTranscoder\ElasticTranscoderClient;
$elasticTranscoder = ElasticTranscoderClient::factory($options);
也许该文件夹是错误的。我们定义的根文件夹,需要基于磁带自动加载机:
Maybe the folder is wrong. Let's define the root folder and require the autoloader based on that:
define('ROOT', dirname(__FILE__));
require ROOT . '/vendor/autoload.php';
它是一个简单的包含路径的问题。
Its a simply include path issue.
这篇关于致命错误:类'AWS \ ElasticTrans codeR \ ElasticTrans coderClient'没有发现在C:\瓦帕\的www \ sep24 \等\ S \ wr.php 5号线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!