Yii - #39;white screen of death#39;, debugging tips(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 - '白屏死机',调试技巧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Yii - '白屏死机',调试技巧


基础教程推荐
- PHPUnit 的 Selenium 2 文档到底在哪里? 2022-01-01
- 将变量从树枝传递给 js 2022-01-01
- php中的PDF导出 2022-01-01
- php 7.4 在写入变量中的 Twig 问题 2022-01-01
- Yii2 - 在运行时设置邮件传输参数 2022-01-01
- 主题化 Drupal 7 的 Ubercart “/cart"页 2021-01-01
- 如何在数学上评估像“2-1"这样的字符串?产生“1"? 2022-01-01
- 使用 scandir() 在目录中查找文件夹 (PHP) 2022-01-01
- Web 服务器如何处理请求? 2021-01-01
- php中的foreach复选框POST 2021-01-01