Standard template for output
| From: | Ken M. Mevand | Date: | Thu, 13 Jul 2000 11:33:43 +0000 |
| Subject: | Standard template for output | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-6410@lists.php.net to get a copy of this message | ||
hi all,
is there a way to use a standard template for all my web pages, such
that _any_ php script just have to include the file and output whatever is
processed at a specific location in the template?
i'm trying to design my app such that any design changes can be done in one
file.
Current Method (every php script must have a require at the top and bottom)
:
<? require("header.inc") ?>
<? ... code ... ?>
<? require("footer.inc") ?>
Ideal method :
<? ... code ... ?>
<? Output to template ?>
Here is a sample template :
<HTML>
<BODY>
<B>Standard Header</B>
<!-- All output must be here -->
<B>Standard Footer</B>
</BODY>
</HTML>
-ken