Re: [請益] php5無法顯示錯誤訊息?

看板PHP作者 (Aries)時間13年前 (2012/11/08 11:02), 編輯推噓1(101)
留言2則, 1人參與, 最新討論串2/2 (看更多)
文件有提到這狀況: 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

11/09 14:39, , 1F
只好先把php.ini的display_errors打開 :)
11/09 14:39, 1F

11/09 14:42, , 2F
我測試的方法是在某行把;拿掉 :)
11/09 14:42, 2F
文章代碼(AID): #1Gco3C8B (PHP)
討論串 (同標題文章)
文章代碼(AID): #1Gco3C8B (PHP)