note 37861 added to function.defined
| From: | Craig at chatspike dot net | Date: | Sun, 30 Nov 2003 16:57:56 +0000 |
| Subject: | note 37861 added to function.defined | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-61162@lists.php.net to get a copy of this message | ||
This can be useful if you want to protect pages which get included from outsiders eyes, on your mail
page (the page viewable by people) put define("X", null); then on all your other pages,
you can then do something like:
if (!defined("X")) {
echo "You Cannot Access This Script Directly, Have a Nice Day.";
exit();
}
And your page is a good as protected :)
----
Manual Page -- http://www.php.net/manual/en/function.defined.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37861
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37861&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37861&report=yes
Search -- http://master.php.net/manage/user-notes.php