显示define('LARAVEL_START',microtime(true))-当我将php版本迁移到7.3时

时间:2019-04-03 05:42:59

标签: php laravel laravel-5.8 php-7.3

当我将开发环境更新到PHP 7.3时,我得到了Message(访问应用程序的主页)

*/ 

  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);

如何处理?

3 个答案:

答案 0 :(得分:1)

它是PHP 7.3的安装问题。我重新安装它已得到修复。

答案 1 :(得分:0)

脚本的某些部分丢失了,但是看来您的php文件像文本一样被对待!升级到php 7.3后检查服务器设置。我想问题出在任何PHP脚本上

答案 2 :(得分:0)

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

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