运行ZendFramework 2骨架应用程序时出现空白页

时间:2015-07-16 19:11:06

标签: php zend-framework skeleton-code

我正在尝试在本地运行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.

这肯定是一些配置问题,但我不知道哪个。谁知道发生了什么?

1 个答案:

答案 0 :(得分:2)

仅猜测,但看起来您正在public目录中运行服务器。我假设您没有public/public目录,因此http://localhost:8888/public不存在。 http://localhost:8888将是公用文件夹中的索引页面。至于空白页面,请检查错误日志。您可能关闭了display_errors,因此它会抛出500错误而不是显示错误。

相关问题