How can I display the error message directly?
My development environment Ubuntu 16.04 PHP 7.0.7 php-fpm nginx
Now the code will only output when it goes wrongAn internal server error occurred.
Want to be able to directly on the page to display the error message, easy to develop. Thank you.
Reply content:
How can I display the error message directly?
My development environment Ubuntu 16.04 PHP 7.0.7 php-fpm nginx
Now the code will only output when it goes wrongAn internal server error occurred.
Want to be able to directly on the page to display the error message, easy to develop. Thank you.
Set_error_handler Registration error handling mechanism
Set_exception_handler Registration Exception handling mechanism
These two methods allow you to intercept when errors occur and add your own logical handling
Open all the error prompts. PHP-FPM need one more step, is php-fpm in the configuration file inside also to the error display open