2

I just discovered that PHP offers a function set_error_handler and was wondering if I could use this to have errors sent to me by mail rather displaying them on-page.

But would there be any point to using set_error_handler? Since E_ERROR won't be caught by that.

Or is there perhaps even a library that already does what I'm trying to do here?

Thanks!

3
  • not sure about email, but you could definitely check your error logs from time to time. if errors occur, they show up in the same folder as the file that the error occured on. Commented Jan 8, 2011 at 22:31
  • So what happens if the same error occurs 1,000 times in an hour? Do you really want 1,000 emails in your inbox? Commented Jan 8, 2011 at 23:43
  • checking error logs in a shared hosting environment is not always possible Commented Jan 9, 2011 at 0:48

1 Answer 1

5

http://net.tutsplus.com/tutorials/php/quick-tip-email-error-logs-to-yourself-with-php/ this will help you.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.