Need to parse ini file to extract values

后端 未结 3 1151
情歌与酒
情歌与酒 2021-01-25 03:58

I have a .ini file with contents of...

[template]
color1 = 000000
color2 = ff6100
color3 = ff6100
color4 = 000000

And a file with contents belo

3条回答
  •  迷失自我
    2021-01-25 04:44

    There's a function for that in php: http://php.net/manual/en/function.parse-ini-file.php

    You could use it like this:

    
    

    The values can be found like this:

    
    

提交回复
热议问题