Hi there, I am currently writing (in php of course!) my own nice application, now i've already made a couple of versions and I am now planning a third version whereby I wan't to eliminate everything I don't like about the other versions.
One of the things I needed to get straightened out is the way that I store my configuration data for the app, at the moment I use php files for storing this data and I place the data in the files like this:
<?php
$Config['DEFAULT_THEME'] = "Darknight";
$Config['DEFAULT_FONT'] = "Geneva";
?>
then I just include the file and hey presto I have the $Config array, also by doing it this way I can edit the configuration using the administration website for my app which basically loads the $Config Array then gives you a form where you can edit each of the values, then writes back each value to a seperate line in the config file (just like how it was originally but with updated values)
Now my problem is this:, I believe that the method I am using to handle config data is outdated / unoptimised and therefore I am hoping that someone can suggest to me a better way of doing things / shed light on a standard that already exists for this purpose.
I can't use a DB because I don't want my config data to rely on the DB being up all the time.
I would like to use XML, but maybe this is not such a good idea because the xml file source could be viewed by somebody entering something like:
http://www.mysite.com/system/config/config.xml
into their browser.
Please any creative suggestions would be very welcome as I really wan't to get this straightened out.
I am using php v4.3.4 but I must make sure that my solution works with at least v4.2
thx in advance, Andy...