clahti2
Posts: 107
|
Posted: 03/08/2012, 8:07 PM |
|
Hello all:
I think this should be easy however I don't see an obvious way to do this. I have a project where this will be installed on multiple servers, the mysql database details may not be the same as what is hard coded into the project. So I need to dynamically set the following attributes from an INI file or something to that effect. Essentially change the hard coded values from the project file to something evaluated at runtime, such as (taken from Common.php):
$CCConnectionSettings = array (
"foo_data_connection" => array(
"Type" => "MySQL",
"DBLib" => "MySQL",
"Database" => "[%DATABASE%]",
"Host" => "[%HOST%]",
"Port" => ""[%PORT%]",
"User" => ""[%USER%]",
"Password" => "[%PASSWORD%],
"Persistent" => false,
"DateFormat" => array("mm", "/", "dd", "/", "yyyy", " ", "HH", ":", "nn", ":", "ss"),
"BooleanFormat" => array("true", "false", ""),
"Uppercase" => false
),
)
There must be a way to do this without hacking the generated code in Common.php, but do it in a global way so I don't have to do it on every 300+ pages in the project. Any ideas?
|
bannedone
Posts: 273
|
Posted: 03/08/2012, 9:57 PM |
|
example
$CCConnectionSettings["foo_data_connection"]["Database"]="value";
_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2 |