Linking to an external HTML file.

Discussion in 'General Software Discussion' started by Jeff, Jul 1, 2002.

  1. Jeff

    Jeff Yarr... I be blind!

    Joined:
    May 6, 2002
    Messages:
    3,191
    Likes Received:
    8
    Trophy Points:
    48
    OK with php you can go:

    <? Include "templates/header.htm"; ?>

    but what if I have a host who doesn't support PHP? Is there a way to do that same fuction without php?
     
  2. UberLord

    UberLord A Legend in Underwear

    Joined:
    May 8, 2002
    Messages:
    5,255
    Likes Received:
    4
    Trophy Points:
    0
    If the server can use Server Side Includes then you can use
    Code:
    <!--#include virtual="http://foo.bar.com/this.html"-->
    AFAIK you cannot do clientside linking in pure HTML

    You could use DTHML and javascript, but that would be kludgy and may not work on some browsers
     
  3. Malus

    Malus BSD SMASH!

    Joined:
    May 13, 2002
    Messages:
    1,170
    Likes Received:
    3
    Trophy Points:
    0
    What he said. I was going to suggest PHP, but you seem to have that covered.
     
  4. UberLord

    UberLord A Legend in Underwear

    Joined:
    May 8, 2002
    Messages:
    5,255
    Likes Received:
    4
    Trophy Points:
    0
    You should really be using <?php instead of <? as <? is also used to define XML namespaces - it can confuse browsers if the servers PHP config is borked
     
  5. Jeff

    Jeff Yarr... I be blind!

    Joined:
    May 6, 2002
    Messages:
    3,191
    Likes Received:
    8
    Trophy Points:
    48
    Yeah I know, but <? is fine for me ;) and if it was like that on this server, DP uses <? for like every PHP tag in it :) So that would make DH really messed.

    I guess I could use <?php though.
     
  6. Jeff

    Jeff Yarr... I be blind!

    Joined:
    May 6, 2002
    Messages:
    3,191
    Likes Received:
    8
    Trophy Points:
    48
    Well the server does support SSI so I am happy, thanks Uber.
     
  7. UberLord

    UberLord A Legend in Underwear

    Joined:
    May 8, 2002
    Messages:
    5,255
    Likes Received:
    4
    Trophy Points:
    0
    Re:

    np - Invoice is in the post :p
     
  8. Jeff

    Jeff Yarr... I be blind!

    Joined:
    May 6, 2002
    Messages:
    3,191
    Likes Received:
    8
    Trophy Points:
    48
    How much is it?
     

Share This Page

visited