It Feels Good to be Included

A bit of history on me…. I’ve been coding websites for a very long time (1996), on MySpace when I had to fill out my “Favorite Book” question – I put Web Programming With Perl 5 (September, 1996 Publication). Yup, as of writing this post it’s two decades old.  I used this book for many years teaching myself Perl for creating dynamic websites. What I’m going to share below is why I got into  some sort of server side scripting. I hated having to fix a header or footer on every .html page of a site. I’m going to talk about PHP in this short post. Even though I started with a foundation in Perl, making the step to web programming with PHP was rather easy. (There are a few dark years of ColdFusion in between that we won’t talk about)

This is simple, and for many developers obvious, but I’m still going to share this classic that I’ve used since my Perl days. Hand code one full page of your site to get the layout, spacing, css, and all correct. Then look at it and decide which parts of your page will repeated on every page of your site. Obviously everything above the opening <body> tag, but, you probably have a logo, and navigation that needs to be on every page. You probably are going to have a copyright and your Google Analytics JavaScript. So, this page you just hand coded is going to actually take 3 files to recreate it. header.php, footer.php and index.php. Check out the following tutorial/link from 2004 (some things just don’t go out of style) for how to create start out creating a simple page with header and footer includes.  Not everything needs to be on clunky WordPress.

Tutorial by WikiBooks “PHP Programming Headers/Footers” 

The photo with this post is my 20 year old copy of Using Perl 5 for Web Programming. If books had feelings, I’m sure it’s feeling really good right now knowing it helped me get my start into my career and to be included in this post.

Find Me Here

J. Aller

Lead Web Architect at Dash Creative Group
After 20 years, I still don't know everything, but I can find the answer or know someone who does. I'm happy to be sharing the solutions I find for the unique problems we face while developing sites for our clients.
Find Me Here

Latest posts by J. Aller (see all)