note 91244 deleted from class.errorexception by googleguy

From: Date: Wed, 12 Sep 2012 03:37:55 +0000
Subject: note 91244 deleted from class.errorexception by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-190634@lists.php.net to get a copy of this message
Note Submitter: gozlan at nett dot co dot il ---- If you want to control when the exception will be display or when not, you can change the value and enter if condition statement: <?php function lockdown($exception) { echo " <strong>lockdown:</strong> " , $exception->getMessage(); } $lockdown = true; //you can change to false if you want to disable the lockdown. if ($lockdown){ set_exception_handler('lockdown'); throw new Exception('the website is under construction, we will be back soon'); } ?> the output will be: lockdown: the website is under construcytion, we will be back soon and nothing else will be shown in the entire website, just the lockdown comment.

« previous php.notes (#190634) next »