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

时间:2011-04-17 19:30:38

标签: php pear

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

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

例如(原始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"

向文件添加错误的线制动器,但我认为主要问题是“”,为什么会添加它们?如何防止它添加它们?

1 个答案:

答案 0 :(得分:0)

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