HTML and CSS Reference
In-Depth Information
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>On Iterators and Indexes</title>
</head>
<body>
<!--#include virtual="/header.html" -->
<div id="Content">
<h1>On Iterators and Indexes</h1>
<p>
Here's a neat little trick Wolfgang Hoscheck <a href="http://
lists.ibiblio.org/pipermail/xom-interest/2004-November/
001501.html">showed me</a>... </p>
</div>
<!--#include virtual="/footer.html" -->
<!--#include virtual="/sidebar.html" -->
</body>
</html>
Customarily, files that contain server-side includes end with .shtml to tell the server to parse them and resolve
the includes before sending them to clients. Although mod_include is compiled into Apache by default, it may
not be enabled for all directories. You need to add these three configuration directives for each directory that
uses server-side includes, either in the main Apache config file or in an .htaccess file:
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Options +Includes
PHP has similar functionality accessed via the include function, as demonstrated in Listing 5.14 .
Listing 5.14. PHP Includes
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>On Iterators and Indexes</title>
</head>
<body>
<?php
include("header.html");
?>
<div id="Content">
<h1>On Iterators and Indexes</h1>
<p>
Here's a neat little trick Wolfgang Hoscheck <a href="http://
lists.ibiblio.org/pipermail/xom-interest/2004-November/
001501.html">showed me</a>... </p>
</div>
<?php
include("footer.html");
include("sidebar.html");
?>
Search WWH ::




Custom Search