including html

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mtuller

    including html

    I have recently started coding at a new position where I have a
    designer that has templates setup. She has different html files that
    do different things. Set the doctype, stylesheet, etc. These were
    created for server side includes, and works great for html pages, butI
    want to include these html files into all of my php pages, and am not
    sure the best way to go about it.

    I usually create functions for this, but then the designer has to
    change the code in the html and the php. Also, in the html where there
    is a " I have to change it to \" if I use echo to print it out. Is
    there a way that I can include the html in a specific location, not
    change or copy the html again, or create a set of functions to include
    the html and then when I call that function it?

  • Michael Fesser

    #2
    Re: including html

    ..oO(mtuller)
    >I have recently started coding at a new position where I have a
    >designer that has templates setup. She has different html files that
    >do different things. Set the doctype, stylesheet, etc. These were
    >created for server side includes, and works great for html pages, butI
    >want to include these html files into all of my php pages, and am not
    >sure the best way to go about it.
    Why not simply include them?

    include 'head.html';
    <?php
    doSomething();
    ?>
    include 'foot.html';
    >I usually create functions for this, but then the designer has to
    >change the code in the html and the php. Also, in the html where there
    >is a " I have to change it to \" if I use echo to print it out.
    You can use single-quotes as well, usually there's no need for escaping.

    Micha

    Comment

    • mtuller

      #3
      Re: including html

      On Jun 21, 10:56 am, Michael Fesser <neti...@gmx.de wrote:
      .oO(mtuller)
      >
      I have recently started coding at a new position where I have a
      designer that has templates setup. She has different html files that
      do different things. Set the doctype, stylesheet, etc. These were
      created for server side includes, and works great for html pages, butI
      want to include these html files into all of my php pages, and am not
      sure the best way to go about it.
      >
      Why not simply include them?
      >
      include 'head.html';
      <?php
      doSomething();
      ?>
      include 'foot.html';
      >
      I usually create functions for this, but then the designer has to
      change the code in the html and the php. Also, in the html where there
      is a " I have to change it to \" if I use echo to print it out.
      >
      You can use single-quotes as well, usually there's no need for escaping.
      >
      Micha
      I didn't realize it was that easy. Thanks.

      Comment

      Working...