Use config vars inside .php file (not the .tpl file)

From: Date: Thu, 13 Mar 2003 17:20:24 +0000
Subject: Use config vars inside .php file (not the .tpl file)
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8622@lists.php.net to get a copy of this message
I am able to use config vars from inside my template (.tpl) files OK -- But I cannot figure out the syntax fo using config vars from within the logic files (.php files) With the following config file: my.conf --------- $host = localhost $db = customer_db $user = root $pwd = mypassword --------- And using the "config_load" method in my .php file - like this: some.php -------- $smarty->config_load('my.conf'); // example // $link = mysql_connect("localhost", "root", "mypassword")
        or die("Could not connect");
// How do I use my config variables to populate the following? $link = mysql_connect($host, $user, $pwd) or die("Could not connect"); ------- I hope that aat least the question makes sense ;-) Many thanks for any help, Tom

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