Quote:
PHP is secure, requires formatting, and xml requires formatting and isn't secure.
The PHP method done above is far more limited, and treats each element as just a big block of HTML, which would make it a nightmare when it comes to a point where one wants to split things up more -- say, subheadings. PHP is no more secure than XML: with read permissions and filesystem access, anyone can read either; without, no-one can. The only way XML could be less secure is if permissions are set up incorrectly. Another disadvantage of using a flat file (of any kind) is the increased scope and likelihood of data overwrite. Say person A edits the "about" page. While she's editing it, person B starts editing the "services" page, then hits the button to save. If that save occurs after person A's edit page has read in the article data, but before she's saved it, all of person A's data will be overwritten -- even though they were working on completely different articles. The more users there are, the higher the chance of this scenario happening becomes.