Page 1 of 1

how to define by non-scalar vlaue.

Posted: Thu Jul 16, 2009 3:33 am
by zoftdev
Dear ,

As define function accept only scalar value.
I have php project which use DB Constant
I have to move configuration to ini file because I want to share configuration with .net applicaiton.

How I do this?

Re: how to define by non-scalar vlaue.

Posted: Thu Jul 16, 2009 9:28 am
by alex.barylski

Code: Select all

$results = parse_ini_file('file.ini');
 
echo $results['db']['name']; // The database name

Code: Select all

file.csv:
 
[db]
 
  name = 'database'
  host = 'localhost'