子域中 Laravel 项目的空白页问题

Blank page issue for Laravel project in Subdomain

我在子域 ( cPanel).根域 (https://ratul.info/) already has a Laravel application. So I was trying to upload another Laravel project in a Sub-domain (https://ecommerce.ratul.info/)。不幸的是,它显示的是白屏,没有任何错误。

子域详细信息

publicindex.php 的文件在 /public_html/ecommerce 中,其他文件在 /public_html/ecommerce/flipmart.

The folder structure is Public_html > ecommerce > flipmart

我已经更改了 index.php

中的路径
require __DIR__.'/flipmart/vendor/autoload.php';

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

子域工作正常。我检查了简单的 HTML 个文件。

需要 DIR.'/flipmart/vendor/autoload.php';

$app = require_once DIR.'/flipmart/bootstrap/app.php'; 如果 Here ecommerce 是您的子域根目录并且 flipmart 是 ecommerce 的子文件夹(如果我没记错的话),那一切都很好。 还要检查供应商文件夹是否存在。