Yii - 'white screen of death', debugging t

2019-02-25 00:12发布

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?

1条回答
太酷不给撩
2楼-- · 2019-02-25 00:41

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.

查看更多
登录 后发表回答