pTutorial

New way to learn Programming

How To Enable Displaying PHP Errors

Enable Error in PHP

In production, display_errors is usually set to off. However, in development, it should be set to on, so that errors get displayed and easily handle by the developer.

Enable Error

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

Note: If you need to disable error pass 0 (zero) to the ini_set() like below -

disable Error

ini_set('display_errors', '0');

See Also


QUOTES OF THE DAY

The ballot is stronger than bullet.

LIKE ON FACEBOOK

+1 ON GOOGLE

SHARE ON TWITTER