Home > Article > Backend Development > How to display PHP errors on web browser
Displaying PHP errors on the browser is helpful for program debugging, so how to display PHP errors on the browser? This article will teach you how to display PHP program errors on the browser so that we can debug the program. Let's take a look at the specific content.
#First, we need to enable the display_errors parameter in the How to display PHP errors on web browser.ini configuration file.
display_errors = on
Then, add the following code to the application PHP script. For example, add this code to index.How to display PHP errors on web browser or other default loading script.
<?How to display PHP errors on web browser ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
This is a sample index.How to display PHP errors on web browser showing enabled errors on the browser.
This article has ended here. For more exciting content, you can pay attention to other related column tutorials on the PHP Chinese website! ! !
The above is the detailed content of How to display PHP errors on web browser. For more information, please follow other related articles on the PHP Chinese website!