|
Posted by Toby Inkster on 09/05/05 20:43
Noozer wrote:
> Just wondering if anyone uses a common starting template they use when
> building an HTML page, ASP page, etc. What shouldn't be considered optional?
My general technique is that each page looks like this:
<?php
$title="My page";
include "inc_top.php";
?>
<!-- page content goes here -->
<?php
include "inc_foot.php";
?>
The "inc_top.php" file opens a PHP session (if I'm using them), checks
authorisation details associated with the session and page, does the HTTP
header stuff, links to style sheets and scripts, writes a <title> element
based on the $title variable, opens database connections, writes out the
<h1> heading based on $title, perhaps writes out a navigation menu and
then starts <div id="content">.
"inc_foot.php" closes <div id="content">, writes out any bottom navigation
and copyright statements, closes the database connection.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Navigation:
[Reply to this message]
|