Home > Article > Backend Development > How to configure php current page error settings
The way to configure the error reporting settings of the current page of PHP is to add the configuration [ini_set('display_errors', 'On');error_reporting(E_ALL);] in the PHP code.
The operating environment of this article: windows10 system, php 7.3, thinkpad t480 computer.
When debugging PHP code, in order to quickly locate errors, we usually turn on error message prompts.
So how do we configure the error reporting settings of the current page? Let us take a look below.
The error_reporting() function specifies which error to report. This function sets the error reporting level of the current script. This function returns the old error reporting level.
The specific settings are as follows:
ini_set('display_errors', 'On'); ini_set('memory_limit', '64M'); //报错,详细 error_reporting(E_ALL); //不报错 error_reporting(0)
Learning video sharing: php video tutorial
The above is the detailed content of How to configure php current page error settings. For more information, please follow other related articles on the PHP Chinese website!