Laravel错误-未知:需要打开失败'. ./public'(include_path ='.; C:\ php \ pear \')在第0行上为“未知" [英] Laravel error - Unknown: Failed opening required '. ./public' (include_path='.;C:\php\pear\') in Unknown on line 0

查看:456
本文介绍了Laravel错误-未知:需要打开失败'. ./public'(include_path ='.; C:\ php \ pear \')在第0行上为“未知"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Laravel 5,并且正在使用PHP函数php -S localhost:8888 folder-name - t来显示网站.

一切正常,直到我更新到Window10.现在,我尝试在浏览器中运行该项目,出现空白页,并且此消息出现在cmd中:

[2015年8月3日星期一00:17:05] PHP致命错误:未知:打开失败 在第0行的Unknown中需要使用"public"(include_path ='.; C:\ php \ pear \')

出了什么问题?

解决方案

实际上是权限错误.但是,如果您尝试直接从本地主机服务器运行,它将可以正常工作.

在Windows 10上,PHP Server将无法访问PHP Pear扩展名,这就是它显示此错误的原因.

如果您正在运行XAMPP.您必须使用 http://localhost/laravel-folder/public 进入您的Apache本地. >

I'm working on Laravel 5 and I'm using PHP function php -S localhost:8888 folder-name - t to show the web site.

Everything is working fine until I updated to Window 10. Now, I try to run the project in my browser, I get a blank page and this message in my cmd:

[Mon Aug 03 00:17:05 2015] PHP Fatal error: Unknown: Failed opening required 'public' (include_path='.;C:\php\pear\') in Unknown on line 0

What is going wrong?

解决方案

It is a permission error actually. But if you try to run directly from your localhost server, it will work.

On windows 10 PHP Server will not be able to access PHP Pear extension that is why it is showing this error.

If you are running XAMPP. you have to go to your apache localhost with http://localhost/laravel-folder/public.

这篇关于Laravel错误-未知:需要打开失败'. ./public'(include_path ='.; C:\ php \ pear \')在第0行上为“未知"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆