2017-02-19 210 views
0

我試圖將我的laravel項目上傳到cPanel。但直到現在,它似乎並沒有工作。 我已經將我的項目中的目錄和文件移動到根目錄中的'lavravel'目錄中。將laravel項目上傳到cPanel

app/ 
bootstrap/ 
config/ 
database/ 
resources/ 
storage/ 
artisan 
composer.json 
composer.lock 
.env 

而且從我的公共文件夾移動文件到public_html 現在我的目錄看起來是這樣的。 Directory

我在以下文件中進行了更改。 laravel /引導/ app.php

/* 
|-------------------------------------------------------------------------- 
| Public Path 
|-------------------------------------------------------------------------- 
| 
| Set the path to the Laravel "public" directory so that any files/packages 
| that use app('path.public') to get the "public" path find the right path. 
| DO NOT include a trailing slash on the path. 
| 
*/ 
$app->bind('path.public', function() 
{ 
    return __DIR__.'/../../public_html'; 
}); 

的public_html/index.php文件

require __DIR__.'/../laravel/bootstrap/autoload.php'; 
$app = require_once __DIR__.'/../laravel/bootstrap/app.php'; 

但是,它似乎並不工作。它顯示一個空白頁面。正如你可以通過這個URL看到的。 nepalride.com

回答

0

你應該看看Laravel

上傳文件後,請確保您設置的storagebootstrap/cache文件夾正確的權限。

此外,您需要運行composer install來安裝Laravel所需的供應商軟件包。您上傳的laravel文件夾沒有vendors文件夾。

查看錯誤日誌,你會看到你遇到的所有問題。