1

当我将开发环境更新到 PHP 7.3 时,我收到了以下消息(访问应用程序主页)

*/ 

  define('LARAVEL_START', microtime(true)); 

/* 
|-------------------------------------------------------------------------- 
| Turn On The Lights 
|-------------------------------------------------------------------------- 
| 
| We need to illuminate PHP development, so let us turn on the lights. 
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send 
| the responses back to the browser and delight our users. 
| 
*/ 

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

/* 
|-------------------------------------------------------------------------- 
| Run The Application 
|-------------------------------------------------------------------------- 
| 
| Once we have the application, we can handle the incoming request 
| through the kernel, and send the associated response back to 
| the client's browser allowing them to enjoy the creative 
| and wonderful application we have prepared for them. 
| 
*/ 

$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 
$response = $kernel->handle( $request = Illuminate\Http\Request::capture() ); 
$response->send(); 
$kernel->terminate($request, $response);

如何处理?

4

4 回答 4

1

脚本的某些部分丢失了,但您的 php 文件似乎被视为文本!升级到 php 7.3 后检查您的服务器设置。我想问题出在任何 php 脚本上

于 2019-04-03T05:53:26.040 回答
1

它是一个 PHP 7.3 安装问题。我重新安装它已经修复了。

于 2019-04-03T06:28:18.287 回答
0

如果您在浏览器中看到代码,则说明您没有正确安装 PHP

您可以使用命令提示符检查本地计算机中是否安装了 PHP 版本php -v

于 2019-04-03T05:56:04.173 回答
0

我认为 apache2 没有用 PHP 正确设置

再试一次 sudo apt-get install php7.4/php7.3

于 2022-01-12T12:06:29.943 回答