Home > Backend Development > PHP7 > body text

How to enable error prompts in php7

藏色散人
Release: 2023-02-18 06:10:01
Original
1962 people have browsed it

How to enable error prompts in php7: 1. Modify the php.ini file and enable error prompts; 2. Modify the httpd.conf file and add "php_flag display_errors on" in the last line; 3. Restart the Apache service And php service is enough.

How to enable error prompts in php7

The operating environment of this article: windows7 system, PHP7.3 version, DELL G3 computer

How to enable error prompts in php7?

PHP7.3 turns on error reminder

##The server php version has been upgraded When I arrived at php7.3, I found that there were no error prompts during the test. I searched for information online and successfully turned on the error reminder.

Operation process

  • Modify the php.ini file to enable error reminders, the operation is as follows


Remove the display_errors comment, Set the value to On,

Remove the error_reporting comment, and set the value to E_ALL | E_STRICT, as follows

display_errors=On
error_reporting=E_ALL | E_STRICT
Copy after login

  • Modify the httpd.conf file and add the following settings in the last line

  • php_flag display_errors on
    php_value error_reporting 2039
    Copy after login

    How to enable error prompts in php7

    • Restart the Apache service and the php service, and the error reminder will be displayed.


    Conclusion

    I tried to ignore the first step and proceed directly to the second and third steps. The error reminder can still be turned on successfully. Check the comments carefully. , I learned that the php error reminder is turned on by default, mainly because Apache blocks php errors. I am still a very careful person.

    If you have any objections to this article, please write your comments in the article comments.

    I hope everyone can go further and further on the road of programming.

    You can obviously rely on your face to make a living, but you have to rely on your talent. This is the gap between you and Mingming

    [Recommended learning:

    PHP video tutorial]

    The above is the detailed content of How to enable error prompts in php7. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!