apache Zend 框架项目显示空白页面,没有任何错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2539965/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
zend framework project shows blank page without any errors
提问by ulduz114
i created a simple project with zf and it works fine, but when i copy it to other pc it just show a blank page without any page or errors ?
我用 zf 创建了一个简单的项目,它工作正常,但是当我将它复制到其他电脑时,它只显示一个空白页面,没有任何页面或错误?
my zf version is 1.9 and in other pc zf version 1.9 too
我的 zf 版本是 1.9,在其他 pc zf 版本也是 1.9
what do you do about this problem?
你怎么处理这个问题?
回答by mik
Do you have error reporting enabled on your machine? Make sure, that you have these lines in your php.ini file:
您的机器上是否启用了错误报告?确保您的 php.ini 文件中有这些行:
error_reporting = E_ALL
display_errors = on
It will help you to find the problem by showing the error. If it doesn't help, try to put this code in your index.php in public directory
它将通过显示错误来帮助您找到问题。如果没有帮助,请尝试将此代码放在公共目录中的 index.php 中
ini_set('display_errors', 1);
Also make sure, that DocumentRoot points to your Zend project public folder.
还要确保 DocumentRoot 指向您的 Zend 项目公共文件夹。
回答by vfilby
Are the memory limits the same on both servers? I have seen similar results using php (with zend, albeit). When I run out of memory, just a blank white screen is the result.
两台服务器上的内存限制是否相同?我已经使用 php 看到了类似的结果(尽管使用了 zend)。当我用完内存时,结果只是一个空白的白屏。
回答by Andrei Regiani
This error is caused because your server is running version 4 of PHP, change to version 5and it will work.
出现此错误是因为您的服务器运行的是 PHP 4 版,更改为 5 版即可正常工作。

