I am trying to build a totally dynamic site. My plan is to have the dynamic site use databases for simple content and so on, but things like the web site title (which are the same for all pages), page colours and themes etc. will be stored externally in an .inc or .ini or *.php file.
I've got the databases well and truly under wraps, but I'm still trying to figure out the best way of storing these config variables.
I want to be able to parse these variables in each page and use them when I want to. If I want to change the variables, I plan to use a form that writes the values back into the file for use again.
I'm not totally stupid, and have experimented with an *.ini file i.e.
$filename = "someinifile.ini";
$configFile = parse_ini_file($filename);
$myVars = extract($configFile);
which allows me to use any of the vars in the ini file, and because it is processed by the form the actual variable values are written (rather than variable names).
I'm just wondering if this is the best or most efficient way of doing such things - I would love to know if anyone else out there has any brilliant ideas or examples of how to do it best.
Ta Ta Ta