php tips and tricks

Php Tweaks, settings and tricks

 

Php Set display Error for a specific page:

To display errors for a specific page, set this on the top of the php page:

ini_set(‘display_errors’, 1);
ini_set(‘log_errors’, 1);
ini_set(‘error_log’, dirname(__FILE__) . ‘/error_log.txt’);
error_reporting(E_ALL);

Php Set timeout for a specific page :

ini_set('max_execution_time', 300); //300 seconds = 5 minutes

You may also like...