Jump to content

Do you use parse_ini_file() or json_decode() to store configuration files?


Recommended Posts

I have a small configuration file which PHP must be able to read from and write to.

 

Do you recommend using JSON, or using a PHP ini file along with parse_ini_file()?  Please explain your reasoning.

 

If JSON, how do you recommend saving and retrieving the data?  For instance, an array or object?

 

If an ini file, how do you recommend saving the file?

 

Thanks

Edited by NotionCommotion
Link to comment
Share on other sites

Why all the mystery in a simple ini file? Why not a simple text file with a defined format? You want the user to maintain it, so how is it going to get to the server? Email? Ftp? ok. So now it's on the server. Why does it have to be endoded. Why not just like the php.ini file format?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.