tedd wrote:
> Hi gang:
> 
> Is there a way I can use a htaccess directive to require a php script to
> be "included" within each file contained within that directory?
> 
> For example, let's say I have a directory with 100 scripts in it, but I
> want each script within that directory to pass through an authorization
> script before executing.
> 
> The hard way is for me to go through each of the 100 scripts and add the
> statement "require(auth.php)", but I don't want to do that (I'm too lazy
> and beside there is too great of a chance of an error). So, is there a
> way for me to circumvent this problem by using a htaccess directive?
> 
> Now, I know that I can use htaccess to require basic authorization, like
> so:
> 
> AuthType Basic
> AuthName "admin"
> AuthUserFile /home/httpd/vhosts/mydomain.com/.htpass
> require valid-user
> 
> But I don't want a file containing user ids and encrypted passwords in
> the file system. Instead, I want to move the user ids and passwords into
> the database and out of the file system. I can do this with an
> authorization script, but I don't want to alter 100 scripts to do it.
> 
> Opinions and suggestions welcomed.
> 
> Thanks,
> 
> tedd

.htaccess

php_value auto_prepend_file "/path/to/auth.php"

-- 
Thanks!
-Shawn
http://www.spidean.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to