Re: [SMARTY] Config variables in PHP-file - still no solution
| From: | messju mohr | Date: | Wed, 26 Mar 2003 18:05:56 +0000 |
| Subject: | Re: [SMARTY] Config variables in PHP-file - still no solution | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8917@lists.php.net to get a copy of this message | ||
On Wed, Mar 26, 2003 at 07:12:04AM -0800, Martin Voelkening wrote:
> Hi,
>
> Sorry for trying again, but I am really stuck and I need your help.
> Thanks. Here is the problem:
>
> I have a problem to access variables from a config file in an
> included php-file. The setup is as follows:
>
> include_var_1.conf (1 is $customerID in this case):
> ---------------------------------------------------------------------
> cus_longname = "Cyprus Company"
> cus_shortname = "Cyrpus"
> ...
>
> index.tpl:
> --------------
> {assign var=file value="include_var_%d.conf"|sprintf:$customerID}
> {config_load file=$file scope="global"}
> ...
> {include_php file="/.../www/include_searchaudio.inc"}
>
> How can I access all the variables from the config file
> 'include_var_x.conf' in the included PHP file
> 'include_searchaudio.inc'? I tried several versions but nothing
> worked. I would be grateful if you could tell me exactly in which
> files what code belong.
http://smarty.php.net/manual/en/api.get.config.vars.php
??
btw: your smarty ob object inside include_searchaudio.inc is $this.