使用PEAR模块config_lite获取/设置ini文件密钥,保存更新的ini文件时出现问题


get/set ini file keys with PEAR module config_lite, problem saving updated ini file

https://github.com/pce/config_lite/blob/master/README.asciidoc

我使用Config_Lite,这是一个PEAR模块,非常适合设置和获取ini文件键值。问题是,当我保存它时,它不会保留文件结构。

例如(原始ini文件(:

[scripts]
[admin]
hide_fields[] = ctr_ad_headerImg
[widget_areas]
0.name = "Top Navigation"
0.id = top-nav
0.description = "Widget area at the very top of the page"
[default_colors]
sitebg = #EEEEEE
footerbg = #F8F8F8
link = #5F8200
url = #000000
bg = #F8F8F8
text = #000000
border = #F8F8F8
lu_link = #112BEA
lu_url = #112BEA
lu_bg = #EFEAE4
lu_text = #112BEA
lu_border = #F8F8F8

修改保存的ini文件:

[scripts]
[admin]
hide_fields[0] = "ctr_ad_headerImg"
[widget_areas]
0.name = "Top Navigation"
0.id = "top-nav"
0.description = "Widget area at the very top of the page"
[default_colors]
sitebg = "f500f5"
footerbg = "F8F8F8"
link = "F8F8F8"
url = "F8F8F8"
bg = "F8F8F8"
text = "F8F8F8"
border = "F8F8F8"
lu_link = "F8F8F8"
lu_url = "F8F8F8"
lu_bg = "F8F8F8"
lu_text = "F8F8F8"
lu_border = "F8F8F8"

在文件中添加了错误的换行符,但我认为主要问题是",为什么要添加它们?我如何阻止它添加它们?

请在pear.php.net上打开Config_Lite包的功能请求。