How to update an ini file with php?

前端 未结 3 1418
北荒
北荒 2020-12-06 19:38

I have an existing ini file that I have created and I would like to know if there was a way to update a section of the file or do I have have to rewrite the entire file each

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-06 20:12

    If you use the PHP INI functions, you must rewrite the file each time.

    If you write your own processor, you could (with limitations) update in place. If your insertions are longer or shorter than your deletions, you'll have to rewrite the file anyhow.

提交回复
热议问题