我已经在系统上安装了骨架应用程序。它的工作开发服务器。但当我运行代码localhost时,我收到以下类型的错误:
A 404 error occurred
Page not found.
The requested URL could not be matched by routing.
No Exception available
© 2005 - 2015 by Zend Technologies Ltd. All rights reserved.
您还必须确保Apache配置为支持.htaccess文件。这通常通过更改设置来完成:
1AllowOverride无至
1AllowOverride FileInfo
欲了解更多信息,请访问网址:http://framework.zend.com/manual/current/en/ref/installation.html
如果我没有弄错,.htaccess文件就是您的问题检查:http://framework.zend.com/manual/current/en/user-guide/skeleton-application.html
"如果你看到一个标准的Apache 404错误,那么在继续之前,你需要修复.htaccess的使用。如果你正在使用带有URL重写模块的IIS,请导入以下内容:"
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [NC,L]
向下滚动到"使用ApacheWeb服务器",它就在该部分的底部。
- "zend骨架404错误"的第一个谷歌结果
否则,建议将此页面作为一个良好的入门教程:https://code.google.com/p/zf2notes/wiki/zf2_beginners_tutorial
错误很简单,听起来基本.htaccess文件是为路由而设置的,它要么需要友好的urls/参数,要么没有正确地通过htaccess文件传递某些内容。