RE: [PHP] What exactly is Exit?

From: Date: Tue, 12 Sep 2000 13:36:02 +0000
Subject: RE: [PHP] What exactly is Exit?
Groups: php.general 
Request: Send a blank email to php-general+get-16353@lists.php.net to get a copy of this message
I put nothing below my example simply because it was an example, but the real reason I need it is in fact for aborting on an error... like: All my software goes... oops error... if ($error) { include 'head.inc'; echo 'an error occured and we must abort for security reasons'; include 'foot.inc'; Exit; } The output ... or call a function wich will do an Exit, or in an else statement ... I just needed to know if it was secure enought... I couldn't find anything about it ... Thanks for answering my question, Matt. -----Original Message----- From: Matt Schroebel [mailto:MSchroebel@hsus.org] Sent: Tuesday, September 12, 2000 10:19 PM To: Maxim Maletsky; php-general@lists.php.net Subject: Re: [PHP] What exactly is Exit? Exit aborts processing of the script; anything that follows isn't processed or output. In your example, they have the exact meaning. I don't see why you would want to use an exit there if there isn't anything following it, since nothing would have happened anyway. It's more useful for aborting on errors, or authorization failure after sending an non-authorized message or header. >>> Maxim Maletsky <maxim.maletsky@lincmedia.co.jp> 09/12 8:07 AM >>> >> a quick question: >> what is Exit; ?

« previous php.general (#16353) next »