解析错误不显示 [英] Parse errors are not displayed

查看:77
本文介绍了解析错误不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望PHP在屏幕上显示解析错误.相反,我得到的是空白页.没有任何内容写入服务器的错误日志文件.

I want PHP to display parse errors on screen. What I get instead is a blank page. Nothing gets written to server's error log file.

我的设置:PHP5.2.9/ IIS 6 (不是Apache!).

My setup: PHP5.2.9/IIS 6 (not Apache!).

我的PHP.INI:

error_reporting=E_STRICT
display_errors = On
display_startup_errors = On
log_errors = On
error_log = "C:\Program Files\Zend\ZendServer\logs\php_error.log"

如何获取解析错误或致命错误以记录或显示在屏幕上?

How do I get parse or fatal errors to be either logged or shown on screen?

谢谢, 特姆里(Temuri)

Thanks, Temuri

更新:在使用了不同的开关之后,这似乎是IIS特定的问题.有任何想法吗?

UPDATE: After playing with different switches it looks to be an IIS specific problem. ANY IDEAS FOLKS?

推荐答案

在php文件本身中设置错误级别并不能解决问题,因为文件本身无法解析!

Setting error level in php file itself does not resolve the problem here because the file itself cannot be parsed !!

您需要按如下所示更改php.ini中的error_reporting行:

You need to change error_reporting line in your php.ini as follows:

error_reporting = E_ALL

顺便说一句:php.ini文件中有一些示例显示如何显示错误消息类型.

BTW: There are some examples in php.ini file about what to do to display which type of error messages.

祝你好运

mcemoz

这篇关于解析错误不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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