note 82611 added to function.defined
| From: | admin at baceto dot com | Date: | Fri, 18 Apr 2008 09:57:57 +0000 |
| Subject: | note 82611 added to function.defined | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-138473@lists.php.net to get a copy of this message | ||
if (!defined("X")) {
echo "You Cannot Access This Script Directly, Have a Nice Day.";
exit();
}
This one is nice, actually for half an hour I was searching for an idea or a tip how to protect some
files that must be accessed only if are included in another file ( that would admin.php). This one
would perfectly do the trick.
Thanks a lot!
----
Server IP: 89.190.194.18
Probable Submitter: 78.90.46.203
----
Manual Page -- http://www.php.net/manual/en/function.defined.php
Edit -- https://master.php.net/note/edit/82611
Del: integrated -- https://master.php.net/note/delete/82611/integrated
Del: useless -- https://master.php.net/note/delete/82611/useless
Del: bad code -- https://master.php.net/note/delete/82611/bad+code
Del: spam -- https://master.php.net/note/delete/82611/spam
Del: non-english -- https://master.php.net/note/delete/82611/non-english
Del: in docs -- https://master.php.net/note/delete/82611/in+docs
Del: other reasons-- https://master.php.net/note/delete/82611
Reject -- https://master.php.net/note/reject/82611
Search -- https://master.php.net/manage/user-notes.php