note 38689 added to function.parse-ini-file

From: Date: Fri, 02 Jan 2004 22:13:49 +0000
Subject: note 38689 added to function.parse-ini-file
Groups: php.notes 
Request: Send a blank email to php-notes+get-62815@lists.php.net to get a copy of this message
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 ) ---- Manual Page -- http://www.php.net/manual/en/function.parse-ini-file.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38689 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38689&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38689&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#62815) next »