parse_ini_string
parse_ini_string
Parse a configuration string
**parse_ini_string** string $ini_string bool $process_sections int $scanner_mode
returns the settings in string
in an associative array.
parse_ini_string``ini_string
The structure of the ini string is the same as the php.ini's.
Waarschuwing: > This function must not be used with untrusted inputs, unless is since the parsed output might contain the values of sensitive constants, such as constants holding a database password.
scanner_mode``INI_SCANNER_RAW
ini_stringThe contents of the ini file being parsed.
process_sections
By setting the
parameter to true, you get a multidimensional array, with
the section names and settings included. The default
for is false
process_sections``process_sections
scanner_mode
Can either be (default) or
. If
is supplied, then option values will not be parsed.
INI_SCANNER_NORMAL``INI_SCANNER_RAW``INI_SCANNER_RAW
The settings are returned as an associative on success,
and false on failure.
array
Opmerking: > There are reserved words which must not be used as keys for ini files. These include: , , , , , , , . Values , , and result in , and values , and result in , unless mode is used. Characters must not be used anywhere in the key and have a special meaning in the value.
null``yes``no``true``false``on``off``none``null``off``no``false``""``on``yes``true``"1"``INI_SCANNER_TYPED``?{}|&~![()^"
parse_ini_file