2017-11-20 9 views
0

このスタックオーバーフローには、すでにコンポーザーをインストールする必要がある多くの問題があります。私は自分のチャンネル(ビン)フォルダにコンポーザーをインストールしました。バージョンComposer version 1.1.1 2016-05-17 12:25:44の作曲家。しかし、私は私のプロジェクトを実行しようとすると、私はこのエラーが発生します。警告:require(/home/eg//public_html/mydata/../ vendor/autoload.php):ストリームを開くことに失敗しました:

他に何が必要ですか?私のインデックスファイルに

これはそれが

インデックス

<?php 

/** 
* Laravel - A PHP Framework For Web Artisans 
* 
* @package Laravel 
* @author Taylor Otwell <[email protected]> 
*/ 

define('LARAVEL_START', microtime(true)); 

/* 
|-------------------------------------------------------------------------- 
| Register The Auto Loader 
|-------------------------------------------------------------------------- 
| 
| Composer provides a convenient, automatically generated class loader for 
| our application. We just need to utilize it! We'll simply require it 
| into the script here so that we don't have to worry about manual 
| loading any of our classes later on. It feels great to relax. 
| 
*/ 

require __DIR__.'/../app/vendor/autoload.php'; 

/* 
|-------------------------------------------------------------------------- 
| Turn On The Lights 
|-------------------------------------------------------------------------- 
| 
| We need to illuminate PHP development, so let us turn on the lights. 
| This bootstraps the framework and gets it ready for use, then it 
| will load up this application so that we can run it and send 
| the responses back to the browser and delight our users. 
| 
*/ 

$app = require_once __DIR__.'/../app/bootstrap/app.php'; 

/* 
|-------------------------------------------------------------------------- 
| Run The Application 
|-------------------------------------------------------------------------- 
| 
| Once we have the application, we can handle the incoming request 
| through the kernel, and send the associated response back to 
| the client's browser allowing them to enjoy the creative 
| and wonderful application we have prepared for them. 
| 
*/ 

$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 

$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture() 
); 

$response->send(); 

$kernel->terminate($request, $response); 

エラー

Warning: require(/home/e.g./public_html/mydata/../vendor/autoload.php): failed to open stream: No such file or directory in /home/eg/public_html/mydata/index.php on line 24 

Fatal error: require(): Failed opening required '/home/eg/public_html/mydata/../vendor/autoload.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/eg/public_html/mydata/index.php on line 24 
+0

"例えば" requireエラーのドットは、実際のファイルのパスの "eg"と一致していないようです。たぶんあなたがホームパスがエラーの原因であるかどうか探してみてください! – Niels

+0

@Nielsちょうどタイプミス。私はちょうどその部分を編集しました。セキュリティ上の理由:) – Switz

答えて

0

はたぶん、これは明白であり、あなたはすでにそれを実行してきたどのように見えるかですが、実行する必要があります:

composer install 

すべてのプロジェクトの依存関係をインストールします。

+0

このエラーが出るこのパッケージにはPHP 7.0.0が必要ですが、PHPバージョン(5.6.29)はその要件を満たしていません。どのように私のcpanelのPHPバージョンを変更するのですか? – Switz

+0

これはホスティングプロバイダのヘルプセンターにある必要があります。もちろん、ホスティングプロバイダがそれをまだサポートしていない場合、PHPバージョンを変更することは不可能かもしれません。 –

+0

cPanelアカウントのWebインターフェイスからMultiPHPを使用してPHPバージョンを変更することができます –

関連する問題