laravel警告和致命错误要求打开失败

时间:2019-10-18 11:07:19

标签: php laravel

laravel提供错误无法在(文件路径)中打开所需的thrn(文件路径)(include_path ='C:\ xampp \ php \ PEAR')

//my index file code id shown below


//require __DIR__.'public/vendor/autoload.php';
require_once $_SERVER['DOCUMENT_ROOT'].'public/vendor/autoload.php';

/*
|--------------------------------------------------------------------------
| 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__.'/public/bootstrap/app.php';
$app = require_once (realpath($_SERVER["DOCUMENT_ROOT"]).'/public/bootstrap/app.php';

2 个答案:

答案 0 :(得分:2)

如果这是新安装,则需要运行composer install

如果它是现有安装(存在供应商文件夹),请运行composer update

答案 1 :(得分:1)

步骤1: 运行:Composer Install以进行新安装。

运行:现有安装的Composer更新。

第2步:制作.env文件

步骤3:运行:Php artisan migration(制作数据库)

步骤4:运行:Php artisan key:generate