[英]PHP turn off all errors but save errors to error_log
我在共享主機上並希望隱藏訪問者的所有錯誤,因此我使用error_reporting(0)但這將導致錯誤不保存在文件所在目錄中創建的error_log文件中。 如何關閉錯誤但將它們添加到error_log?
試過display_errors,0但似乎我的共享主機不允許編輯ini
謝謝
ini_set("display_errors", 0);
ini_set("log_errors", 1);
//Define where do you want the log to go, syslog or a file of your liking with
ini_set("error_log", "syslog");
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.