Re: [SMARTY] Use config vars inside .php file (not the .tpl file)

From: Date: Fri, 14 Mar 2003 13:45:05 +0000
Subject: Re: [SMARTY] Use config vars inside .php file (not the .tpl file)
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8649@lists.php.net to get a copy of this message
On Thu, Mar 13, 2003 at 06:28:56PM -0300, Marcio Conceicao wrote: > Monte Ohrt wrote: > >get_config_var('foo'), or for a more direct method, FAQ config file > >section. > > > > >>http://smarty.incutio.com/?page=SmartyFrequentlyAskedQuestions > > > I use that, convert config vars to PHP vars. > > $SETTINGS = parse_ini_file("./configs/my.conf"); > while($key = key($SETTINGS)){ > $$key = current($SETTINGS); //variable variables > next($SETTINGS); > } just FYI: this looks like a re-implementation of: $SETTINGS = parse_ini_file("./configs/my.conf"); extract($SETTINGS) have fun messju > That is not smarty way but I think is more usefull. > > Marcio > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Universeller multifunktionaler Interface-Adapter.: Lötkolben. Peter Berlich

« previous php.smarty.general (#8649) next »