>    I come for advice once again. Say i have a file dbconnect.inc which
>connects to my database. Now if this file is located in a directory
>accessible for to the web is there anyway that if someone types in that file
>i can detect it being accessed, instead of included, and redirect them
>Thanks guys!
>- Noah

Sure, try putting a quick if statement at the top checking for the $PHP_SELF.  If it's 
dbconnect.inc, then have it die with a message...

if($PHP_SELF == 'dbconnect.inc') { die{"Access Denied!"); }

Also, I know that my server isn't set to parse .inc files, and it shows the source of 
them.  For that reason, I renamed all my include files to .php.


PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to