White screen of death!

后端 未结 11 642
暗喜
暗喜 2020-12-06 13:55

After debugging a codeigniter app that were installed into a new development environment, I have started to freak out when seeing white screens with nothing more available.

11条回答
  •  春和景丽
    2020-12-06 14:29

    I've found out, since the time of my question, that nothing seems to ensure that errors are always outputted with PHP, which seems to throw white screens here and there. Regardless of PHP's ini-settings.

    I've found out that the best workaround however is to use the following line to ensure that error logging is put into a file easily accessed and monitoredby the application:

    ini_set('error_log', MYPATH .'logs/errorlog.log'); 
    

    As far as I've tested it, when white screens appear - it also gets logged into this errorlog. Seems to be the easiest way to know what happens when things go wrong.

提交回复
热议问题