Re: Making PHP do something every time it exits

From: Date: Tue, 26 Dec 2000 17:09:00 +0000
Subject: Re: Making PHP do something every time it exits
Groups: php.general 
Request: Send a blank email to php-general+get-31851@lists.php.net to get a copy of this message
There is a register-shutdown-function, but you can't output anything in this function. Your best bet is to call a custom exit function, which then calls exit(). I'd imagine you currently have something like: if ("we're done"){ exit(); } Change it to: function myExit(){ print('footer here'); exit(); } if ("we're done"){ myExit(); } Chris On Sun, 26 Dec 1999, Brandon Orther wrote: > Date: Sun, 26 Dec 1999 08:42:01 -0800 > To: PHP User Group <php-general@lists.php.net> > From: Brandon Orther <brandon@webintellects.com> > Subject: [PHP] Making PHP do something every time it exits > > Hello and happy holidays, > > I have a script that has many paths it can take while executing, so > there > are a lot of points where I exit the script. I want to have it echo > a > footer before exiting is this possible? > > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > brandon@webintellects.com > 800-994-6364 > www.webintellects.com > -------------------------------------------- > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.general (#31851) next »