Re: [phplib] authentication and htaccess From: Michael Chaney (mdchaney <email protected>)
Date: 08/11/00

> PHPLIB has some good session tracking and permissions but is there any way
to
> link this to .htaccess files. Basically I dont want to have to put a
page_open
> and permission check on each page but would rather use a single file at
the top
> of each tree to test if a user has the priviledge for that area. If
anyone has
> any ideas then please let me know.

You can put most Apache directives into a .htaccess file, so take advantage
of that feature. Make a special prepend file that first includes the
current prepend.php3 file, then does a page open. Also create an append
file that does a page_close. Then, in .htaccess, set those as the
auto_prepend_file and auto_append_file. For PHP3:

php3_auto_prepend_file your_file_name.php3
php3_auto_append_file your_file_name.php3

PHP4:
php_admin_value auto_prepend_file your_file_name.php
php_admin_value auto_append_file your_file_name.php

Michael

--
Michael Darrin Chaney
mdchaney <email protected>
http://www.michaelchaney.com

--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>