Re: how to hide dbconnect file if its in published directory?
| From: | Mark Ferraretto | Date: | Tue, 10 Jul 2001 04:14:09 +0000 |
| Subject: | Re: how to hide dbconnect file if its in published directory? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-57062@lists.php.net to get a copy of this message | ||
I usually have a directory called html where all my php files are and secure where any secure stuff (like db connects) reside. Then, all I do is include the file
require('../secure/secure.inc');
Obviously html maps to a web server path but secure doesn't.
Mark
John Weaver wrote:
On Monday 09 July 2001 06:11 pm, Noah Spitzer-Williams wrote:-- Mark Ferraretto Phone: +61 8 8396 2448 Ferraretto IT Services Fax: +61 8 8396 7176 26 Observation Drive Mobile: +61 407 959 719 Highbury SA 5089 Email: mark@ferraretto.com <mailto:mark@ferraretto.com> Australia ICQ: 64748102Hey guys, 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 elsewhere? Thanks guys! - NoahThe best compromise I have seen is to name your file -> somefile.inc.php