[dev] OT: how to get global vars..??

Chuck Hagenbuch chuck@horde.org
Wed, 12 Sep 2001 10:46:06 -0400


Quoting René Lund Jensen <lundeman@tbkol.dk>:

> I'm trying to use the $conf-hash in my own library-file in the
> horde/app-name/lib directory. but I always get the Undefined variable: conf

In your functions, you need to do:

global $conf;

or any other globals you need access to (global can take a comma-separated 
list, such as: global $conf, $prefs;

Or you can just use $GLOBALS['conf'].

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
Some fallen angels have their good reasons.