search
HomeBackend DevelopmentPHP ProblemWhat to do if php.ini does not display errors

How to set php.ini not to display errors: 1. Find and open the php.ini file; 2. Set "display_errors = Off" to block errors.

What to do if php.ini does not display errors

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

## What should I do if #php.ini does not display errors?

PHP.ini Sets the shielding and display of PHP error messages (errors):

If an error occurs during the running of the PHP program, it will be displayed in the browser Whether to display error information and the level at which error information is displayed are what we need to control during program development, debugging, and operation.

The following is an explanation of how to control the shielding and display of PHP error messages (errors) by setting php.ini:

1. Whether error messages are displayed

Display errors display_errors = On

                                                                                                                                                                      use using using the   error above using        through out out out out out out out out out had through using in  )
Here we generally set it to E_ALL, and use the error_reporting() function in the PHP program to set the error information level of the current program.

3. Set whether to save the error log

During the operation of the program, we generally set it not to display errors, so that the running status can be recorded by saving the error log
log_errors = On (record the error log)
log_errors = Off (no logging)
If you save the error log, you need to set the error log saving file at the same time

error_log = e:/php/logs/php_error.log


Recommended learning: "
PHP Video Tutorial
"

The above is the detailed content of What to do if php.ini does not display errors. For more information, please follow other related articles on the PHP Chinese website!

Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.