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 - '白屏死机',调试技巧
基础教程推荐
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何替换eregi() 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
