Yii - '白屏死机',调试技巧 [英] Yii - 'white screen of death', debugging tips

查看:17
本文介绍了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.

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

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