[eluser]Buso[/eluser]
The other day I started using serialize() to save arrays of data that can change (but not so often) into files (with no extension, as I only access the via read_file()/write_file()
, and found it very comfortable. I'm using it for stuff like the site's names and base_urls (to detect which app is being called, in a multi-application enviroment)
Are there any cons about this?
Of course I could have saved the data into a regular .php file, but I wanted to be able to modify it from another application, and I didn't want it to go parsing the .php file and messing with it. I tried using .xml first, but I hated it and started over with serialize(), and now I'm very happy with the result.
So now I started thinking 'why not save this way other data too? Like config variables like 'is_site_closed', or 'brand_name', etc?
Any thoughts?