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.

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.