Ubuntu-development environment, PHP7 nginx display error message

Source: Internet
Author: User
Tags fpm
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

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.