【发布时间】:2021-07-15 03:32:44
【问题描述】:
我正在将 laravel 项目上传到 cpanel,我已经在index.php 中设置了路径
但它返回命运错误
错误
Fatal error: require(): Failed opening required '/home/customer/www/easy-websites.online/public_html/../quickquiz/vendor/autoload.php' (include_path='.:/usr/local/php73/pear') in /home/customer/www/easy-websites.online/public_html/index.php on line 24
我没有quickapp 的单独目录,但它显示错误
我正在将我所有的项目文件和文件夹上传到public_html
index.php
require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
.htacess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
文件结构
publichtml{
app
bootstrap
etc..
index.php
.htaccess
vendor { autoload.php}
}
index.php 和 .htaccess 在 public_html 和 autoload.php 在 vendor 文件夹下
【问题讨论】: