看板 PHP 關於我們 聯絡資訊
文件有提到這狀況: 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
vgtarian:只好先把php.ini的display_errors打開 :) 11/09 14:39
vgtarian:我測試的方法是在某行把;拿掉 :) 11/09 14:42