I’m starting have a directory full of PHP files that I need to protect from unauthorized access. It would pretty much be the end of the world for me if someone unauthorized was somehow able to gain access to these files. One thing that I should note, however, is that other files on my website need to include some of these PHP files in order to function correctly.
What would be the best way to secure these files? I have read about using a .htaccess file to password protect a directory, but I’m wondering if that’s really the best and most secure way?
Thank you!
Put those sensitive PHP files in a directory protected by .htaccess