| Securing directories? Go easy on me if this is a stupid question, but is there a way in which PHP can be used to secure directories, similar to what .htaccess is able to do?
What I'd like to do is to have a hidden directory containing various PDF and MS Word files and I'll build a PHP script that allows authorized people to retrieve those files. I'm okay on that part.
But if somebody knew the directory name and one of the file names, they would be able to bypass my PHP script and access the file directly. I need to prevent this, but if at all possible I'd like to avoid using .htaccess and secure the directory using only PHP. Is this possible? |