Password protection on a directory
I want to password protect a directory and it's sub directories using .htaccess, but I also have some php scripts that need to access some files inside the protected directory. The access is using something like this 'require_once('functions.php');'
But if I password protect the directory that functions.php is in, then access is denied to my php script. I tried adding a rule to allow the server's own IP to the .htaccess, but that didn't work. Can someone suggest some ways around this problem?