PHP读取ini配置文件

parse_ini_file(file,process_sections)//process_sections 为true 时为多维数组

"test.ini" 的内容:
[names]
me = Robert
you = Peter

[urls]
first = "http://www.example.com"
second = "http://www.w3school.com.cn"
PHP 代码:

输出:
Array
(
[me] => Robert
[you] => Peter
[first] => http://www.example.com
[second] => http://www.w3school.com.cn
)

你可能感兴趣的:(PHP读取ini配置文件)