0
我試圖將我的laravel項目上傳到cPanel。但直到現在,它似乎並沒有工作。 我已經將我的項目中的目錄和文件移動到根目錄中的'lavravel'目錄中。將laravel項目上傳到cPanel
app/
bootstrap/
config/
database/
resources/
storage/
artisan
composer.json
composer.lock
.env
而且從我的公共文件夾移動文件到public_html 現在我的目錄看起來是這樣的。
我在以下文件中進行了更改。 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