note 20743 added to function.parse-ini-file

From: Date: Mon, 15 Apr 2002 02:17:11 +0000
Subject: note 20743 added to function.parse-ini-file
Groups: php.notes 
Request: Send a blank email to php-notes+get-29348@lists.php.net to get a copy of this message
A better attempt to create variables from your .ini file: $SETTINGS = parse_ini_file("./your.ini.php"); extract($SETTINGS); There are special cases when you don't have access to anything but your www folder, and can't modify the apache configuration as well.. (free webspace provider, chrooted ftp access, etc). To hide your variables without a parse error, you can use this (storing your ini file with a .php extension): ; <?php /* DO NOT REMOVE THIS LINE [first_section] one = 1 five = 5 [second_section] path = /usr/local/bin ; DO NOT REMOVE THIS LINE */ ?> Hope I could help steer -- http://www.php.net/manual/en/function.parse-ini-file.php http://master.php.net/manage/user-notes.php?action=edit+20743 http://master.php.net/manage/user-notes.php?action=delete+20743 http://master.php.net/manage/user-notes.php?action=reject+20743

« previous php.notes (#29348) next »