我刚刚安装了 laracast/flash 并通过 composer 更新了 nesbot/carbon。 cmd 在下载 carbon 时发疯了。 Cmd界面一会显示整个界面散乱的字和框,下载完成。
做了 php artisan serve
在 localhost:8000
我有以下错误。
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required 'C:\xampp\htdocs\NC World\ProjectName\server.php' (include_path='C:\xampp\php\PEAR') in Unknown on line 0
最佳答案
发生此错误是因为 server.php 文件丢失。可能是删除或移除 从你的项目目录。我已经遇到过这个问题。只需添加 server.php 项目根目录下的文件。你可以从任何其他 Laravel 项目目录添加这个文件,或者只创建一个名为 的文件。 server.php 在 Laravel 项目的根目录下粘贴以下代码:
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylor@laravel.com>
*/
$uri = urldecode(
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
);
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
// built-in PHP web server. This provides a convenient way to test a Laravel
// application without having installed a "real" web server software here.
if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
return false;
}
require_once __DIR__.'/public/index.php';
这个过程对我有用。
关于php - 未知 : Failed opening required on line 0. laravel 5.6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49574906/