Tags
Asked 2 years ago
9 Jun 2021
Views 180
QuickIos

QuickIos posted

Showing all errors and warnings in php

Showing all errors and warnings
sqltreat

sqltreat
answered Apr 25 '23 00:00

To show all errors and warnings in PHP, you can use the following code:



error_reporting(E_ALL);
ini_set('display_errors', 1);

The error_reporting function sets the level of error reporting, and E_ALL will show all errors and warnings.

The ini_set function sets the value of a configuration option. Here, we are setting the value of display_errors to 1 , which means that PHP will display errors and warnings on the screen.

It is important to note that showing all errors and warnings on a production server is not recommended, as it can expose sensitive information to potential attackers. It is best to only show errors and warnings in a development environment.




Post Answer