note 76360 added to function.exit
| From: | dan at osu1 dot php dot net | Date: | Wed, 11 Jul 2007 22:11:51 +0000 |
| Subject: | note 76360 added to function.exit | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128395@lists.php.net to get a copy of this message | ||
In relation to the below comment, you may find that using the following may be more appropriate:
<?php
# ... user has pressed log out, cookies have been wiped, etc.
// Stay on the same page at time of logout (useful if a page is also available to anyone who
isn't logged in
header ("Location: http://" . $_SERVER['HTTP_HOST']
. $_SERVER['PHP_SELF']);
?>
Of course $_SERVER['PHP_SELF'] can be omitted if you wish to redirect to the root
directory of the site (http://www.example.com) or a path of your choosing can be used instead.
Alternatively, if you've a solid system implemented and logged out users can access the page
too, you can continue with showing the page without using exit() or header().
----
Server IP: 69.147.83.197
Probable Submitter: 90.201.95.234
----
Manual Page -- http://www.php.net/manual/en/function.exit.php
Edit -- https://master.php.net/note/edit/76360
Del: integrated -- https://master.php.net/note/delete/76360/integrated
Del: useless -- https://master.php.net/note/delete/76360/useless
Del: bad code -- https://master.php.net/note/delete/76360/bad+code
Del: spam -- https://master.php.net/note/delete/76360/spam
Del: non-english -- https://master.php.net/note/delete/76360/non-english
Del: in docs -- https://master.php.net/note/delete/76360/in+docs
Del: other reasons-- https://master.php.net/note/delete/76360
Reject -- https://master.php.net/note/reject/76360
Search -- https://master.php.net/manage/user-notes.php