note 55990 deleted from function.include by mazzanet
| From: | mazzanet@php.net | Date: | Sat, 20 Aug 2005 02:02:36 +0000 |
| Subject: | note 55990 deleted from function.include by mazzanet | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-93937@lists.php.net to get a copy of this message | ||
Note Submitter: mat
Reason: useless
----
If you want to tell people not to look at your source code in a more creative way than just setting
your .htaccess correctly in the includes folder, you can just put something like this at the start
of the included files.
<?php
if( __FILE__ === $_SERVER['DOCUMENT_ROOT'] . $_SERVER['PHP_SELF'] ){
echo '<html><head><title>Go away.</title></head>';
echo '<body><h1>Go away.</h1>';
echo '<p>Stop looking at my source code.</p></body></html>';
exit;
}
?>
I'd rather this than define something every page I include something on. Just personal taste.