如何解决主机上的PHP版本不兼容问题,以及如何以正确的方式获取Kernel:class?
分析错误:语法错误,意外的“类”(T_类),应为 中的标识符(T_字符串)或变量(T_变量)或“{”或“$” /第50行的home/capollos/public_html/canopyinteriors/index.php如何解决主机上的PHP版本不兼容问题,以及如何以正确的方式获取Kernel:class?,php,laravel,Php,Laravel,分析错误:语法错误,意外的“类”(T_类),应为 中的标识符(T_字符串)或变量(T_变量)或“{”或“$” /第50行的home/capollos/public_html/canopyinteriors/index.php 至少升级到PHP5.5,以便能够将类名解析与::Class一起使用 检查您的cPanel是否有版本更改器。Laravel 5.4至少需要5.6.4-很公平,他可能会在5.6/7.0上使用Laravel,但是在5.5.x中引入了通过::class对类解析的支持。Thank找
至少升级到PHP5.5,以便能够将类名解析与::Class一起使用
检查您的cPanel是否有版本更改器。Laravel 5.4至少需要5.6.4-很公平,他可能会在5.6/7.0上使用Laravel,但是在5.5.x中引入了通过::class对类解析的支持。Thank找到了更改为7的选项。@Zach
<?php
require __DIR__.'/../../../canopy/bootstrap/autoload.php';
$app = require_once __DIR__.'/../../../canopy/bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
?>