How to have all the pages of my site reference the same HTML code?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jdmswong
    New Member
    • Jan 2011
    • 1

    #1

    How to have all the pages of my site reference the same HTML code?

    Hi,

    All the pages of my site will have same banner and menu. How can I use PHP have all of these pages get HTML from one file, which I can edit to update all my pages in tandem.

    Thanks,
    -JD
  • JKing
    Recognized Expert Top Contributor
    • Jun 2007
    • 1206

    #2
    What you are looking for is called a server side include.

    Code:
    <?php include("examplefile.php"); ?>
    PHP Include
    Last edited by JKing; Jan 13 '11, 08:20 PM. Reason: Grammar

    Comment

    • AutumnsDecay
      New Member
      • Mar 2008
      • 170

      #3
      Easily one of the best php features, even if it's the ONLY php feature you end up using in an entire site.

      Comment

      Working...