Generally I like to have header and footer, but you should look at the
template engines out there (smarty for example) for some inspiration.

This for example, would work fine for a WIDE range of pages:


$include = $_GET['include'];
$file = "path/to/my/dir/{$include}.html";
if(!file_exists($file)) { $file = "path/to/my/dir/error.html"; }
<? include($file); ?>

Some prefer one style others prefer another.


on 23/09/02 3:46 PM, Patrick Lebon ([EMAIL PROTECTED]) wrote:

> Is there a way to create a layout file that can wrap around other pages with
> data in them. I am currently using two includes (one at the start of the
> page and one at the end) but was wondering if there is a better way to do
> this.
> Thanks

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to