作者aries198012 (Aries)
看板PHP
标题Re: [请益] php5无法显示错误讯息?
时间Thu Nov 8 11:02:33 2012
文件有提到这状况:
Although display_errors may be set at runtime (with ini_set()),
it won't have any affect if the script has fatal errors.
This is because the desired runtime action does not get executed.
http://ppt.cc/TwTW
可能是因为你的程式有 fatal error
所以在 php script 里 runtime 设定 ini_set
才会失效
※ 引述《vgtarian (恶魔的眼泪)》之铭言:
: 各位朋友:
: 我蒐寻了一下
: 若在 php.ini 打开 display_errors 的选项
: 在使用流览器测试时是可以正常显示错误讯息
: 但为了安全性问题所以将它关闭
: 平常有在coding 所以能够显示错误讯息是比较好debug
: 故在需要显示错误讯息的php档加入
: ini_set("display_errors", "On");
: 但还是不会印错误讯息
: 请问应该怎麽做才能开例外显示错误讯息呢?
: 我有忽略哪些细节吗?
: 感谢
: php: php 5.3.3
: os: linux debian 6.0
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 1.166.8.254
1F:推 vgtarian:只好先把php.ini的display_errors打开 :) 11/09 14:39
2F:→ vgtarian:我测试的方法是在某行把;拿掉 :) 11/09 14:42