[imp] Including imp/config/conf.php

Jan Schneider jan@horde.org
Thu Nov 21 23:00:36 2002


Zitat von "Oliver Schulze L." <oliver@samera.com.py>:

> Thanks Jan,
> it worked.
> 
> Now, if I want to read all the variables that are in the config/* files
> of each
> Horde aplication(Horde, IMP, etc), will I need some sort of Hack or
> can I do that just by including some special files in the lib/*
> directory?
> 
> I'm doing right now "some sort of hack", just wanted to know if there
> is a simple way. ;-)

There is indeed. Take a look at Registry::importConfig().
 
> Oliver
> 
> Jan Schneider wrote:
> 
> >Zitat von "Oliver Schulze L." <oliver@samera.com.py>:
> >
> >
> >
> >>>>I get this error:
> >>>>Fatal error: Call to a member function on a non-object
> >>>>in this line:
> >>>>$conf['mailbox']['deleted_flag'] = Horde::img('deleted.gif', 'alt="'
> .
> >>>>_("Deleted") . '"');
> >>>>
> >>>>
> >>>>
> >>>>
> >>>There is no member call in this line. Are you sure that the error
> >>>
> >>>
> >>message
> >>
> >>
> >>>and the line are matching?
> >>>
> >>>
> >>The problem is that I can't call: Horde::img
> >>that is inside imp/config/conf.php
> >>
> >>Try this:
> >>$ cd imp/config
> >>$ cp conf.php.dist conf.php
> >>and use this file
> >><?php
> >>// put this .php in your horde/imp/ directory
> >>echo "before<br>";
> >>include_once(./config/conf.php);
> >>echo "after<br>";
> >>?>
> >>
> >>
> >
> >Try this:
> >$ cd imp/config
> >$ cp conf.php.dist conf.php
> >and use this file
> ><?php
> >// put this .php in your horde/imp/ directory
> >echo "before<br>";
> >define('HORDE_BASE', dirname(_FILE_) . '../');
> >include_once(HORDE_BASE . '/lib/Horde.php');
> >include_once(./config/conf.php);
> >echo "after<br>";
> >?>

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft


More information about the imp mailing list