Laravel 站点无法在实时服务器中运行

Laravel site isn't working in live server

我项目的根结构如下:

index.php

突出显示的行是自己抛出的错误:

我不知道如何解决这个问题。显然自动加载不工作但不知道如何修复路径是正确的。 我还删除了供应商文件夹和 运行: composer install, composer update and then composer dump-autoload.

还能做什么。我的本地加载正常。只有现场直播。我也 运行 这个:

php artisan cache:clear
php artisan config:clear
php artisan route:clear

php artisan config:cache
php artisan route:cache
php artisan optimize

进入laravel/public目录,将所有文件夹复制到public文件夹之外。然后更改 index.php 文件中的路径。如果您的项目在 public_html/laravel/ 这样的目录中,请执行此操作
require DIR.'/../laravel/vendor/autoload.php';$app = require_once DIR. '/../laravel/bootstrap/app.php'; 如果你的项目在 public_html/ 那么 require DIR.'/vendor/autoload.php';$app = require_once DIR.'/bootstrap/app.php';