Yii - “白屏死亡”,调试提示 [英] Yii - 'white screen of death', debugging tips

查看:156
本文介绍了Yii - “白屏死亡”,调试提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行Yii应用程序的分段服务器,现在给出了一个白屏死机。我看不到有什么东西被屏蔽(甚至是源代码,当'查看源代码'),本地相同的代码运行没有任何问题。



任何人都可以建议在yii应用程序中调试白屏死机的好例程?

解决方案

在yii中获取空白屏幕主要是因为error_reporting已关闭。

  error_reporting(-1); 
ini_set('display_errors',true);

在index.php中应该可以得到你的输出。



请注意,当您没有输出时,您可以随时查看application.log和apache error.log以获取信息。


I have a staging server running a Yii application that now gives a 'white screen of death'. I cannot see anything being ouputted to the screen (or even the source code when 'view source'), locally the same code runs without any issues.

Can anyone suggest a good routine to debug 'white screen of death' within a Yii application?

解决方案

Getting a blank screen in yii is mostly because error_reporting is off. Put

error_reporting(-1);
ini_set('display_errors', true);

in index.php should get your output back.

Note that you can always look in application.log and apaches error.log for informations when you don't have some output.

这篇关于Yii - “白屏死亡”,调试提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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