Add the following line of code to your top of PHP code
ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
Display PHP Error using .htaccess
php_flag display_errors on php_flag display_startup_errors on php_flag log_errors on php_flag html_errors on php_value error_log /path/PHP_errors.log0 0
Following are the types of errors in a PHP code
To report all errors
error_reporting(E_ALL);
OR
ini_set("error_reporting", E_ALL); //It is also same as E_ALL
To Report all errors except E_NOTICE
error_reporting(E_ALL & ~E_NOTICE);0 0
PHP Provides different ways to display errors and warnings
error_reporting
It displays all types of errors except E-NOTICE, E_DEPRECATED, and E-STRICT.
display_errors
By default, the value of display errors is off. Set it on to display all errors including syntax errors.
log_errors
By default, the value of log_errors is ON. It indicates the error logging should be done or not.
0 0Please Login to Post the answer