note 38689 deleted from function.parse-ini-file by nlopess
| From: | nlopess@php.net | Date: | Sat, 03 Jan 2004 10:08:07 +0000 |
| Subject: | note 38689 deleted from function.parse-ini-file by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-62847@lists.php.net to get a copy of this message | ||
Note Submitter:
----
Above it states "Constants may also be parsed in the ini file so if you define a constant as an
ini value before running parse_ini_file(), it will be integrated into the results."
However, I found that isn't always the case. For insnace, if you do the following:
define('sys_path',dirname(__FILE__));
$CFG=parse_ini_file('my.ini');
print_r($CFG);
With an ini file like:
[global]
site_path = /username
img_dir = sys_path/username/images
sys_path = sys_path
If your sys_path constant = '/home/user/www', then your output would be:
Array
(
[site_path] => /username
[img_dir] => sys_path/username/images
[sys_path] => /home/user/www
)
NOT:
Array
(
[site_path] => /username
[img_dir] => /home/user/www/username/images
[sys_path] => /home/user/www
)