[Techtalk] simple php question

SlashBunny slashbunny at btinternet.com
Sun Mar 17 17:30:01 EST 2002


Hi Jenn

PHP allows you to import header and footer code from separate files into
another PHP page.

You can place

<?php
include("header1.inc");
?>

and

<?php
include("footer1.inc");
?>

at the start and the end of your main page file.  In the header1 and footer1
files place in the HTML you want to generate on each page.  You will have to
ensure that your main page has a .php extension for it to compile with the
header and footer.

I've done that on my site http://www.thegeekgirl.com (which is still under
construction).  The header file generates everything up to the <td> that
starts off the main content on each page.  Its a nice way to work with a
large site.  Say if you want to change your toolbar or navigation system -
you just have to edit one file.  Also you can use different headers and
footers for different parts of your site.

Hope that helps.  If you want any more help - don't hesitate to email off
list.

Rgds,
Clare

----- Original Message -----
From: "Davis, Jennifer" <JDavis at JUSTICE.GC.CA>
To: <techtalk at linuxchix.org>
Sent: Sunday, March 17, 2002 7:14 AM
Subject: [Techtalk] simple php question


> Another quickie question.  Is there a quick way with php to import some
code
> from one html file to another.  Basically I want to write a menu bar that
> will appear on all pages of a site.
>
>
>
>
> Thanks again
>
> Jenn
> _______________________________________________
> Techtalk mailing list
> Techtalk at linuxchix.org
> http://mailman.linuxchix.org/mailman/listinfo/techtalk




More information about the Techtalk mailing list