blackcell Posted February 26, 2008 Share Posted February 26, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/93148-solved-easiest-way-to-block-access-to-directory/ Share on other sites More sharing options...
amites Posted February 26, 2008 Share Posted February 26, 2008 place the file in a directory outside of your public_html folder scripts can still access it, though there will be no web access Quote Link to comment https://forums.phpfreaks.com/topic/93148-solved-easiest-way-to-block-access-to-directory/#findComment-477186 Share on other sites More sharing options...
The Little Guy Posted February 26, 2008 Share Posted February 26, 2008 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'; Quote Link to comment https://forums.phpfreaks.com/topic/93148-solved-easiest-way-to-block-access-to-directory/#findComment-477188 Share on other sites More sharing options...
blackcell Posted February 26, 2008 Author Share Posted February 26, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/93148-solved-easiest-way-to-block-access-to-directory/#findComment-477203 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.