PHP Function Parse_Ini_File
The php function parse_ini_file reads a configuration file and returns an associative array of its settings. The key/value pairs are arranged in the format name=value. Keys must not contain any reserved words or any characters that have special meaning in an ini value, for example null, yes, no, on, off, true and false. All numeric values are converted to integer type, and boolean values are evaluated as either true or false. When the INI_SCANNER_TYPED mode is used, boolean and null values are also preserved when possible; however, if a key has a string value that would be interpreted as an integer, it will be converted to the corresponding string value instead (such as "yes" becoming "1" or "no" being converted to "0").
The optional parameter sections specifies whether the ini file has been split into multiple sections. If sections is not specified, parse_ini_file() returns a flat array of all settings in one pass. Otherwise, a multidimensional array is returned that includes section names and their associated settings as subarrays.
This function, like many other functions in PHP, is vulnerable to security issues. This is primarily because ini files are often treated as plain text by web servers, and may be served to browsers when requested. For this reason, it is recommended that you place ini files outside your docroot or reconfigure your web server to not serve them at all. In the case that an ini file is serving as a template for another script, it is highly advisable to use a more secure means of reading configuration data such as mbstring or iconv.