I have been asked to create a template based website builder. One such feature would be – for example – the ability to easily update phone numbers, company name, template used (basically a link to a template folder) and style used. The idea is that rather than manually changing - for example - the company phone number inside the relevant php file, all fields liable to change would be updated using a backend.
My boss wants all the websites to be "self-sufficient" for want of a better phrase – that is he does not want a central database being referenced by all the different websites to obtain phone number, company name etc. Furthermore he is not keen on each website having it's own databse to store these variables.
As such, I came up with the idea of each website having it's own configuration file. Each time the website loads it would read the config file to grab the phone number, company details etc. That way if we wanted to change something we would do so by creating a backend that only updates each website's config file.
As a php newbie I guess my first question is, is this good practice? I imagine that there is a need for this sort of thing a lot in PHP projects, so – in the absence of using databases - is there a more elegant 'tried and tested' method that I should consider? Although the number of variables to be stored would run to maybe 20, and the websites will only consist of a few pages, I am also concerned about overheads.
Ishould mention that a few of the fields may contain large blocks of text (a paragraph or two in each instance), but if this is an issue I think I could get round this. Also the 'editor' would be a secure (in-house only) program.
I have already looked into this a little but the closest I came to was maybe 'serialize' but am not sure 100% yet if that woud fulfill my needs.
Any thoughts on this issue would be greatly appreciated.
Thanks in advance