You are here: Re: Common template for HTML page? « HTML « IT news, forums, messages
Re: Common template for HTML page?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация