Home  >  Article  >  Backend Development  >  php opening error

php opening error

王林
王林Original
2019-09-25 17:55:242805browse

php opening error

How to open and close error prompts in php

1. Find the php configuration file, which is php.ini

2. Search for 'display_errors' in the file and find 'display_errors = Off' or 'display_errors = On'. Off is Close the error prompt, On is

to open the error prompt, and modify it according to your needs.

3. Add the following code to the php file:

//禁用错误报告
error_reporting(0);
//报告运行时错误
error_reporting(E_ERROR | E_WARNING | E_PARSE);
//报告所有错误
error_reporting(E_ALL);

Recommended tutorial: PHP video tutorial

The above is the detailed content of php opening error. 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