NYCPHP Meetup

NYPHP.org

[nycphp-talk] Pear Auth options array

David Mintz dmintz at davidmintz.org
Mon Aug 2 22:34:59 EDT 2004


On Mon, 2 Aug 2004, Matthew Terenzio wrote:

> In practice are most users wrapping this into a class of its own and
> including that all pages.
>
> I mean to say that you wouldn't want to edit all db backed pages if the
> db host changed right? I can handle abstracting it out. Just wanted to
> verify that's the case here.

What I have done is require an 'auth.php' on each page that, well,
requires it. auth.php in turn loads Auth.php and instantiates an Auth,
passing among other things 'dsn'=>DSN in the $options array, where DSN is
a constant defined elsewhere. Worksforme. For even less work, you might
consider doing this by setting a auto_prepend_file directive in an
.htaccess file in the directory in question.

HTH


---
David Mintz
http://davidmintz.org/

        "Anybody else got a problem with Webistics?" -- Sopranos 24:17



More information about the talk mailing list