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