0

I'm on a shared hosting and want to hide all errors from the visitors so I use error_reporting(0) but this will lead to erros not saving in the error_log file that's created in the directory where the file is located. How to turn off erros but add them to the error_log?

Tried display_errors,0 but it seems my shared host is not allowing the edit of ini

Thanks

1 Answer 1

2
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");
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.