php code error prompt

王林
Release: 2023-02-26 12:42:01
Original
3709 people have browsed it

php code error prompt

How to turn on or off code error prompts in PHP

Solution steps:

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

2. Find 'display_errors' in the file

3. Find display_errors = Off or display_errors = On, Off To close the error prompt, On is to open the error prompt. You can modify it according to your needs.

You can also add the following code to the php file:

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

Recommended tutorial: PHP video tutorial

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