致命错误:需要():失败需要开放'C:\瓦帕\的www \ sep24 \ E / SRC / functions.php中'(include_path中=“; C:\ PHP \梨) [英] Fatal error: require(): Failed opening required 'C:\wamp\www\sep24\e/src/functions.php' (include_path='.;C:\php\pear')
问题描述
试图从路径运行瓦帕服务器trans.php程序
Tried to run the trans.php program from wamp server from the path
C:\瓦帕\的www \ sep24。\ E \ trans.php
C:\wamp\www\sep24\e\trans.php
我已经包含在AWS文件夹
I have included the AWS folder in
C:\瓦帕\的www \ sep24。\ E \亚马逊\
C:\wamp\www\sep24\e\Amazon\
和作为访问以及用户目录中瓦帕/ WWW文件夹AWS凭证文件
And AWS credential file in wamp/www folder as well user directory for the access
C:\瓦帕\的www \ .aws \凭据和放大器; C:\ Users \用户名\ .aws \凭据
C:\wamp\www\.aws\credentials & C:\Users\username\.aws\credentials
这是我的程序
<?php
define('ROOT', dirname(__FILE__));
require ROOT . '/vendor/autoload.php';
use Amazon\Aws\ElasticTranscoder\ElasticTranscoderClient;
-------------
------------
// no error here.
?>
当我试图运行的程序,我得到这个错误
When i'm trying to run the program, I get this error
致命错误:需要():失败需要开放'C:\瓦帕\的www \ sep24 \ E / SRC / functions.php中'(include_path中=; C:\ PHP \梨')在C:\瓦帕\ WWW \ sep24。\ E \上线54供应商\作曲家\ autoload_real.php
Fatal error: require(): Failed opening required 'C:\wamp\www\sep24\e/src/functions.php' (include_path='.;C:\php\pear') in C:\wamp\www\sep24\e\vendor\composer\autoload_real.php on line 54
我已经包括AWS所有这是我从混帐下载的软件包。
I have included all the packages of AWS which I downloaded from the git.
我应该做怎样的变化?
推荐答案
使用作曲家。
创建testaws目录,并把composer.json文件,下面的内容(你可以将它调整到您例如PHP版本或开发包需要)
Create testaws directory and put composer.json file with content below (you can adjust it to your needs for example PHP version or dev packages)
{
"name": "yourname/sampleapp",
"description": "Sample app",
"require": {
"php": ">=5.5.0",
"aws/aws-sdk-php" : "dev-master"
},
}
运行作曲家安装
然后在index.php文件中的 testaws
目录,就把这行的的index.php
then in index.php in testaws
directory put this line in index.php
要求__DIR__。 /vendor/autoload.php';
在执行此操作步骤它应该工作。更多关于作曲家,你会发现有
After you do this steps it should work. More about composer you will find there
您也可以找到样例项目这里
Also you can find sample project here
这篇关于致命错误:需要():失败需要开放'C:\瓦帕\的www \ sep24 \ E / SRC / functions.php中'(include_path中=“; C:\ PHP \梨)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!