For my project I have created a folder named DBAccess which holds all database related PHP files having PHP classes,constants functions etc.In the outside of the folder I have created a php file named DBAccess.php.
following is my directory structur in short
Project1
|_DBAccess
| |_functions.php
| |_class.php
| |_constants.php
|_DBAccess.php
|_index.php
|_aboutus.php
.......
Now i wish to restrict any pages in the root directory to use the contents of the DBAccess folder except the DBAccess.php file.Is it posssible in PHP using .htaccess or something else?
You could do something like this:
DebugAccess/foo.php
DBAccess.php
NoDBAccess.php