Email Fatal Error
Contents |
be down. Please try the request again. Your cache administrator is webmaster. Generated Sat, 08 Oct 2016 11:38:08 GMT by s_ac4 (squid/3.5.20)
von GoogleAnmeldenAusgeblendete FelderNach Gruppen oder Nachrichten suchen
original message was received at Mon, 9 Oct 2006 12:22:19 -0500 from smtp.cs.princeton.edu [128.112.136.72] ----- The following https://csguide.cs.princeton.edu/email/errors addresses had permanent fatal errors -----
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to email PHP Fatal Errors only? up vote 9 down vote favorite 4 I am in the middle of refining a rather large bit of code. Alot of it contains many general warnings and notices which do not affect the execution of the code (ie: undefined varilables, or array keys without qoutes). I want to write a function which allows me to concentrate on the fatal errors first and then I will open it up to the less urgent warnings and notices. I found this code, but it emails every little warning notice and error. http://net.tutsplus.com/tutorials/php/quick-tip-email-error-logs-to-yourself-with-php/ How can I modify this code so it only deals with things like: fatal syntax errors undefined functions failure to include files php syntax error-handling share|improve this question edited Nov 24 '13 at 12:34 hakre 134k26215386 asked Oct 17 '11 at 10:24 David 3,8272268119 add a comment| 4 Answers 4 active oldest votes up vote 7 down vote accepted set_error_handler allows you to specify a user-defined error handling function for deciding what to do with certain (but only non-fatal) errors. You can then handle specific types of errors in any fashion you deem necessary, for example notifying a system administrator via email, or saving to a specific log file. See: PHP Doc for further details. With regards to your request you could the following approach: func