phalcon php内置服务器无法打开所需的.htrouter [英] phalcon php built-in server Failed opening required .htrouter

查看:68
本文介绍了phalcon php内置服务器无法打开所需的.htrouter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用php 5.6中的内置http服务器运行phalcon 2.0.7应用程序,并包括.htrouter以使URI重写能够正常工作.一切似乎都找到了,直到我在控制器中使用die()为止.第一次按预期运行,但刷新后会引发PHP致命错误:

Trying to run phalcon 2.0.7 app using built-in http server in php 5.6 and included .htrouter to make URI rewrite working. Everything seems find until I use die() in controller. For the first time it works as expected but when refreshed it throws PHP fatal error:

Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

Fatal error: Unknown: Failed opening required '.htrouter.php' (include_path='.:') in Unknown on line 0

是否可以解决此问题,还是应该开始配置其他http服务器?

Is there a way to fix that or should I start configuring other http server?

推荐答案

我在公共目录中有.htrouter,所以这很有帮助:

I had the .htrouter in my public dir so this helped a lot:

php -S localhost:8000 -t public public/.htrouter.php :)

这篇关于phalcon php内置服务器无法打开所需的.htrouter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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