note 37788 deleted from function.parse-ini-file by victor
| From: | victor@php.net | Date: | Sat, 19 Jun 2004 15:16:29 +0000 |
| Subject: | note 37788 deleted from function.parse-ini-file by victor | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-71351@lists.php.net to get a copy of this message | ||
Note Submitter: simz@naver.com
----
--------------------[ ini file ]------------------------
[sendmail_conf]
sendmail_bin=/sbin/sendmail
sendmail_option=-t
[mail list]
mailto=simz@naver.com
----------------------------------------------------
--------------------[read_config]--------------------------
function read_config()
{
$lines = file(CONFIG_FILE);
$option_arr = parse_ini_file(CONFIG_FILE,TRUE);
while( list($k,$v) = each($option_arr) ){
$$k = $v;
while( list($p,$q) = each($option_arr[$k]) ){
$$p=$q;
define($p,$q);
}
}
printf("sendmail_bin = %s\n",sendmail_bin);
printf("sendmail_option = %s\n",sendmail_option);
printf("mailto = %s\n",mailto);
}
-----------------------------------------------------------