我正在尝试在本地运行ZendFramework 2 skeleton应用程序。我是这个框架的新手。
在使用可用指令here在Openshift上创建PHP5应用程序后,我在本地克隆它并将Zend Skeleton应用程序解压缩到其中。我通过Netbeans安装了Composer安装依赖项。
如Zend说明中所述,我访问了我的public
目录并启动了内置服务器:
cd public
php -S localhost:8888
当我打开http://localhost:8888/
或http://localhost:8888/public
时,我会看到一个空白页面。当我打开http://localhost:8888/public/index.php
时,我得到一个包含错误消息的好页面:
The requested resource /public/index.php was not found on this server.
这肯定是一些配置问题,但我不知道哪个。谁知道发生了什么?
答案 0 :(得分:2)
仅猜测,但看起来您正在public
目录中运行服务器。我假设您没有public/public
目录,因此http://localhost:8888/public
不存在。 http://localhost:8888
将是公用文件夹中的索引页面。至于空白页面,请检查错误日志。您可能关闭了display_errors,因此它会抛出500错误而不是显示错误。