Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 2110 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     HTML/XHTML/DHTML/CSS :

Including header file using HTML

Thread title: Including header file using HTML
Closed Thread    
    Thread tools Search this thread Display Modes  
11-20-2007, 11:59 AM
#1
masjana.liza is offline masjana.liza
Status: I'm new around here
Join date: Nov 2007
Location:
Expertise:
Software:
 
Posts: 3
iTrader: 0 / 0%
 

masjana.liza is on a distinguished road

  Old  Including header file using HTML

Is it possible to include a header and footer file using HTML? I have my file as a .html and need to be able to include the HTML for the header and footer. Anyone know how I can do this?
_________________
Gartengeräte Solarenergie

11-20-2007, 05:58 PM
#2
Seb is offline Seb
Seb's Avatar
Status: Watermelon Man
Join date: Nov 2006
Location: London
Expertise:
Software:
 
Posts: 3,312
iTrader: 36 / 100%
 

Seb is on a distinguished road

  Old

You could use SSI (server side include) or just change the extension to .php and use PHP ?

11-20-2007, 08:16 PM
#3
Joe is offline Joe
Status: Custom User Title
Join date: Apr 2005
Location:
Expertise:
Software:
 
Posts: 2,297
iTrader: 0 / 0%
 

Joe is on a distinguished road

  Old

HTML is just markup language, so no, there's no way of telling it to include files for you. For that you'd need a server side language, such as PHP, SSI, ASP, etc.

11-20-2007, 08:35 PM
#4
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
 
Posts: 6,894
iTrader: 18 / 100%
 

Village Genius will become famous soon enough

  Old

The best way would be to rename them to php. The other way would be to change the .html MIME to be parsed by the PHP parser.

11-21-2007, 12:04 AM
#5
Lee_ is offline Lee_
Status: Member
Join date: Jun 2006
Location: UK
Expertise:
Software:
 
Posts: 184
iTrader: 2 / 100%
 

Lee_ is on a distinguished road

  Old

<!--#include virtual="insertthisfile.html" -->

Doesn't that work anymore?

11-21-2007, 05:55 PM
#6
benzouk is offline benzouk
Status: I'm new around here
Join date: Nov 2007
Location: Cheltenham
Expertise:
Software:
 
Posts: 14
iTrader: 0 / 0%
 

benzouk is on a distinguished road

Send a message via MSN to benzouk

  Old

just php then <?php include ("header.php") ?>

11-21-2007, 07:38 PM
#7
Joe is offline Joe
Status: Custom User Title
Join date: Apr 2005
Location:
Expertise:
Software:
 
Posts: 2,297
iTrader: 0 / 0%
 

Joe is on a distinguished road

  Old

<!--#include virtual="insertthisfile.html" --> will work, as long as his host has SSI support, although he'd probably need to rename his files to .shtml if his host doesn't parse SSI tags if the filetype is .html or .htm.

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed