Jump to content

[SOLVED] Easiest way to block access to directory?


blackcell

Recommended Posts

What is the easiest way to protect your data/undisplayed file directories?  Like an include directory with all of your functions or files with secure database connection information?

 

I thought about just dropping an index.php file in with a die("Access Denied"); but that seems to crude for the capabilities we have nowadays.

first no one can read you functions or database connection information, unless you echo it out.

 

second, you should place that info outside the root directory of your web site if it is that secure.... then

 

if your in your root directory, and want to link to db.php

 

include '../db.php';

first no one can read you functions or database connection information, unless you echo it out.

 

second, you should place that info outside the root directory of your web site if it is that secure.... then

 

if your in your root directory, and want to link to db.php

 

include '../db.php';

First, little guy, your wrong on your first.  I just captured all sensitive information pertaining to database connecting and I didn't echo it.  Thank you for your input and bringing me to the simple thought that has slipped my mind until now, I should move it outside of the directory. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.