6.7. A Better Template

In order to have a header and footer HTML in the previous examples, we used two separate files . It is preferable to maintain one template file—it’s simpler and easier to maintain, and there are fewer opportunities to induce bugs. Both the header and footer HTML can be folded into one file with the following syntax:

# put all ...

Get Open Source Web Development with LAMP: Using Linux, Apache, MySQL, Perl, and PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.