note 32740 added to function.header
| From: | sahasrahla at hotmail dot com | Date: | Thu, 05 Jun 2003 16:17:31 +0000 |
| Subject: | note 32740 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-49802@lists.php.net to get a copy of this message | ||
I have an index page that include_once()'s different PHP files (the different page's
contents) based on the ?page= query string.
To keep people from linking directly to http://www.mysite.com/sitenews.php I put:
header("Location: http://www.mysite.com/?page=sitenews");
in the first line of sitenews.php. Now if it is included from index.php (as it should be) then this
header call will fail and no redirect will take place. However, if you call the file directly, it
will toss you into my index.php page with the correct ?page= query string.
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32740
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32740&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32740&report=yes