ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
There is less than 12 hours left to vote in the 2015 LinuxQuestions.org Members Choice Awards. Click here to go to the polls. Vote now and make sure your voice is heard!
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm trying to understand how to build web pages so that I don't have to have
the same "page" for every little thing I update or what not.
I have a basic "template" that my entire site uses. I've got the title and some
navigation links at the top of all my pages, but I have the exact same code in
all of my pages to display the title and nav links.
So if I want to change or add or delete one of the links I have to go through
all the pages and edit each one manually. (Actually I use sed and awk to help
ease my pain but still). Since my site follows the same "look" throughout all
of the pages and only the content of the tables or whatnot change slightly, I
would like to do it in a more dynamic way.
Some of the look can be incorporated into CSS, but maybe you are already doing that. Since I use php a lot even for simple sites I create my own header and footer and just include them in each page. Then I only need to change the code once to have it reflected throughout the site.
Well, one way to accomplish what you want simply is with SSI - server side includes.
It works like this:
1. In the Apache httpd.conf for the directory, add:
2. Create the file(s) containing the variable content. For example, if you create an "includes" directory in your web document root, you can create an "includes/stuff1.html" file containing a link (or any block of html):