idkwhy Posted November 9, 2012 Share Posted November 9, 2012 A PHP Error was encountered Severity: xxxxx Message: xxxx Filename:xxxxx Line Number: xxxx how do I make error messages appear in this format? Is it a error reporting level or something else? Quote Link to comment https://forums.phpfreaks.com/topic/270484-how-do-i-configure-error-messages-to-format-like-this/ Share on other sites More sharing options...
trq Posted November 9, 2012 Share Posted November 9, 2012 You would need to write a custom handler. Quote Link to comment https://forums.phpfreaks.com/topic/270484-how-do-i-configure-error-messages-to-format-like-this/#findComment-1391208 Share on other sites More sharing options...
idkwhy Posted November 9, 2012 Author Share Posted November 9, 2012 Thank you for responding You would need to write a custom handler. I looked up information for a custom handler.. Now I just need to know, is this type of format supposed to be set in the php.ini file or separately? Quote Link to comment https://forums.phpfreaks.com/topic/270484-how-do-i-configure-error-messages-to-format-like-this/#findComment-1391235 Share on other sites More sharing options...
Solution kicken Posted November 9, 2012 Solution Share Posted November 9, 2012 You set your custom error handler by calling the function set_error_handler and passing it the name of your function. Any time there is an error (of certain types) PHP will call your function to handle the error. You can have that function format the error output however you want by just echoing out the proper html for it. Quote Link to comment https://forums.phpfreaks.com/topic/270484-how-do-i-configure-error-messages-to-format-like-this/#findComment-1391237 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.