语法parse_ini_string(file_path, process_sections)
parametersfile_path − the ini file to be parsed.
process_sections − if set to true, you will get a multidimensional array with section names and settings included.
returnthe parse_ini_string() function returns the settings as an associative array on success. it returns false on failure.
let’s say the content of our “demo.ini” is −
[names]one = anne[urls]host1 = "https://www.example1.com"
example<?php print_r(parse_ini_string("demo.ini"));?>
输出array([one] => anne[host1] => https://www.example1.com)
以上就是在php中的parse_ini_string()函数的详细内容。