How to disable error reporting in php: First open the php.ini configuration file; then find "display_errors="; finally change the value after "=" to "off". You can also add "error_reporting(0)" to the php script to block all error prompts.
Shield PHP error prompt
(Recommended tutorial: php graphic tutorial)
Method One: Add @ before the function that may go wrong, and then or die ("").
For example:
@mysql_connect(...) or die("Database Connect Error")
Method 2: Edit the php.ini configuration file, search for "display_errors =" , and change the value after "=" to "off".
(Video tutorial recommendation: php video tutorial)
Method 3: Add error_reporting(0) before the php script to block all error prompts.
The error_reporting() function specifies which error to report. This function sets the error reporting level of the current script and returns the old error reporting level.
Grammar:
error_reporting(report_level)
The above is the detailed content of How to disable error reporting in php. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Notepad++7.3.1
Easy-to-use and free code editor

WebStorm Mac version
Useful JavaScript development tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.
