Display errors in php

Some times we may need to display the errors in php script when we don’t have access to php.ini file. This can be done using php functions, error_reporting() and ini_set().

Use following script

ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);

Leave a Reply

Your email address will not be published. Required fields are marked *