Yii - '白屏死机',调试技巧
我有一个运行 Yii 应用程序的临时服务器,它现在给出了白屏死机".我在屏幕上看不到任何输出(甚至在查看源代码"时也看不到源代码),在本地运行相同的代码没有任何问题.
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.
谁能建议一个好的例程来调试 Yii 应用程序中的死机白屏"?
Can anyone suggest a good routine to debug 'white screen of death' within a Yii application?
推荐答案
在 yii 中出现空白屏幕主要是因为 error_reporting 关闭.放
Getting a blank screen in yii is mostly because error_reporting is off. Put
error_reporting(-1);
ini_set('display_errors', true);
在 index.php 中应该可以恢复您的输出.
in index.php should get your output back.
请注意,当您没有一些输出时,您可以随时查看 application.log 和 apaches error.log 中的信息.
Note that you can always look in application.log and apaches error.log for informations when you don't have some output.
相关文章