如何在子域中托管Laravel应用程序

时间:2020-02-05 10:34:20

标签: laravel subdomain hosting cpanel

我是第一次在子域中托管laravel应用程序。

这是我创建并设置文档根目录路径的子域。

图片: enter image description here

这是我的根文件夹映像:

enter image description here

当我访问创建的域时:

http://demo.myproject.com/

返回错误

解析错误:语法错误,意外的T_CLASS,在第52行的/home/--/public_html/myrpoject/public/index.php中预期为T_STRING或T_VARIABLE或'$'

Index.php文件

<?php

define('LARAVEL_START', microtime(true));
require __DIR__.'/../vendor/autoload.php';
$app = require_once __DIR__.'/../bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); // line no:52
$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);

是否缺少某些东西?

0 个答案:

没有答案