Inclusion This header appears on each page.

Inclusion Home
SHTML documentation

frameworkstart contents
frameworkend contents

These links appear on each page down the left edge of the page giving the site a common look and feel.

This example showed how to use server-side inclusion. That no longer works now that the dragonnorth server has move to Unix. PHP inclusion is used instead. The SHTML documentation is preserved, both ar shown below.

To format the pages in this example, I used a table instead of frames. The table displays each page with a header, a list of links in the lefthand column, a content area in the righthand column, and a footer.

The header, the list of links, and the footer are the same on every page, giving all the pages in this example a common look-and-feel. The value of inclusion is that these identical areas are not duplicated in each page. Instead, they come from two files called pagestart and pageend. Because these files are used to display each page, making a change in one of the files immediately (such as adding a link in the pagestart file) updates all the pages on the site.

The following code shows the essential portion of the HTML used to create this page. Look carefully at the lines that contain the #include statements (bolded for emphasis). Although these lines look like comments, they are the ones that do the work for you.

	<TITLE>Inclusion Example</TITLE>
	<?php require("frameworkstart.php"); ?>
	<!-- #include file="" -->
	<!-- put the unique content of the page here -->
	The content area of the page is left out.
	<!-- after the unique content of the page bring in the close and footer -->
	<!-- #include file="" -->
	<?php require("frameworkend.php"); ?>

This footer shows up at the end of each page.
The number of times one of the inclusion pages has been read is: 577 Webmaster: