Print Reseller Scheme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP Template Include

Discussion in 'Website Design Forum:' started by tim, Feb 12, 2009.

  1. tim

    tim Senior Member

    Hi guys,

    I recently came across a pretty average idea for putting together an e-commerce site for a client.

    I wanted a template (header and all that) coded in php to bring in content to a certain place in the template. The code lists the bare parts of it, like the <html> and <head>, and (optional) side bar etc, leaving main content blank so stuff can be imported into it.

    If you don't know what I mean, go to TurnKey I.T Solutions - Web Design, I.T Consultancy, VoIP Telecommunications - Based in Somerset and press cmd+u - they only have the side bar links and the <head> <html> info, just pulling in different links to fit in the actual main content. But how do I make that happen without using frames? J'ai no idea.
  2. tbwcf

    tbwcf Active Member

    search php include.... i think its pretty simple php, wordpress uses something similar
  3. Jazajay

    Jazajay Active Member

    Hay Tim.

    <?php include"header.php"?>
    <?php include"footer.php"?>

    Then by making a change in either the footer or header php files changes any page using those files all at once. Think a server side CSS sheet if you will which allows (X)HTML. :)


    Purple ~ XHTML
    Red ~ PHP
  4. tim

    tim Senior Member

    OOOOOHHH! Of course! Thanks very much!
  5. tbwcf

    tbwcf Active Member

    There ya go! - Jazajay to the rescue! - sorry I was so brief - got a bit of a misson on at work so couldn't take much time out
  6. Jazajay

    Jazajay Active Member

    No worries Tim, glad me and Tbwcf could help you out. :)
  7. tim

    tim Senior Member

    ahh didn't notice your post tbwcf, but thanks!

    i've used it before, but i was looking at the opposite function, getting the header to do a php include of a file upon request.

Share This Page