Hidden [.Section] config vars in php file
| From: | Tom Henry | Date: | Fri, 14 Mar 2003 03:05:00 +0000 |
| Subject: | Hidden [.Section] config vars in php file | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-8633@lists.php.net to get a copy of this message | ||
After learning to gain access to config vars in my /php files (thanks for the help earlier today) the urge to refine got the best of me...
Now I find that I cannot see how to get access to the vars in "hidden" sections of conf files that are loaded into the .php file:
Example:
my.conf
-----------
globalvar = some global value
// "hidden" section
[.Database]
password = mydatabasepasswd
// Also: tested with NOT "hidden" section
// [Database]
// password = mydatabasepasswd
-----------
my.php
-----------
// This does work when "not hidden" syntax
// is used in the config file
// But does NOT work when [.Database] is "hidden" with the "." (dot)
$smarty->config_load('my.conf','Database');
$cfg_vars = $smarty->get_config_vars();
// var_dump($cfg_vars); // Use this to check and prove we have it
extract($cfg_vars);
// database calls using $mydatabasepasswd
...
...
------------
Again - I am NOT expecting the "hidden" section vars to be accessible in the .tpl files - only in the .php files
Am I missing some syntax/subtlety (or is this a feature ;-)
TIA,
Tom Henry