Page 1 of 1

How do I include a separate page (modular)

Posted: Thu Jul 01, 2004 11:30 pm
by bradles
If I have a header for my site with my logo on it that is one table 60px high and 100% wide and call it "header.php" can I include that on my index.php script so that whenever I change the header.php it will update on all my pages that include this? If so, how do I do this? I was sure I came across a website tutorial about writing modular scripts like this but can't find it again.

Posted: Thu Jul 01, 2004 11:35 pm
by feyd
[php_man]include[/php_man]

Posted: Thu Jul 01, 2004 11:35 pm
by ol4pr0

Code: Select all

<?
include("header.php");
echo 'Here comes the index ... ';
?>
EDit: To late lol..

Posted: Thu Jul 01, 2004 11:42 pm
by bradles
thank you both.

Does this mean I can include .html files as well as .inc and .php?

Posted: Thu Jul 01, 2004 11:43 pm
by feyd
yep

Posted: Thu Jul 01, 2004 11:53 pm
by bradles
awesome...thanks feyd.