Ubuntu-php7nginx displays error messages in the development environment

Source: Internet
Author: User
How can I directly display the error message? My development environment ubuntu16.04php7.0.7php-fpmng.pdf now only outputs aninternalservererroccurred when code errors occur. I hope to display the error information directly on the webpage for development convenience. Thank you. How can I directly display the error message?
My development environment is ubuntu 16.04 php 7.0.7 php-fpm nginx

When a code error occurs, onlyAn internal server error occurred.

It is hoped that the error information can be displayed directly on the webpage for convenient development. Thank you.

Reply content:

How can I directly display the error message?
My development environment is ubuntu 16.04 php 7.0.7 php-fpm nginx

When a code error occurs, onlyAn internal server error occurred.

It is hoped that the error information can be displayed directly on the webpage for convenient development. Thank you.

Set_error_handler registers the error handling mechanism
Set_exception_handler registers the exception handling mechanism

These two methods can intercept you when an error occurs and add them to your own logic.

Enable all error messages .. One more step is required for php-fpm, that is, the error display should be opened in the configuration file of php-fpm.

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.