SitePoint Sponsor |
|
User Tag List
Results 1 to 12 of 12
Thread: html include
-
Oct 9, 2004, 06:52 #1
- Join Date
- Feb 2004
- Location
- Grahamstown
- Posts
- 634
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
html include
Does anyone know if it is possible to include files with pure html, for example an html equivalent to
Code:<?php include('file.php') ?>
-
Oct 9, 2004, 06:57 #2
- Join Date
- May 2004
- Location
- North Pole
- Posts
- 450
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
post in the HTML forum, they may be able to help
-
Oct 9, 2004, 07:38 #3
- Join Date
- Jun 2004
- Location
- Wales, UK
- Posts
- 788
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Nah they dont. Including a file is locating a file and then using it. As HTML is client side, it doesnt have the ability to look files up on a server like PHP, ASP etc do. Just use the code you posted in the top of your HTML document?
If knowledge is power - Why isn't our army librarians?!
Statistics show that 63% of all statistics are fake.
When i was little i broke my neck, and i havent looked back since.
I completed the internet in 1 week. The end boss was pretty easy though.
-
Oct 9, 2004, 08:04 #4
- Join Date
- Dec 2003
- Location
- Albany, New York
- Posts
- 1,355
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
No. You need some type of server side language. Just use PHP. If you need to keep your extensions as *.html, then put this in .htaccess:
Code:AddType application/x-httpd-php .php .html
-
Oct 9, 2004, 09:17 #5
- Join Date
- Mar 2004
- Location
- West Midlands, United Kingdom
- Posts
- 2,631
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I 'think' you can do this..... i remember a guy in a recent post saying so.
<!--#include file="filename.html" -->
Just add that in the html file.
-
Oct 9, 2004, 09:59 #6
- Join Date
- Dec 2003
- Location
- Albany, New York
- Posts
- 1,355
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Again, with that you'll need a line in .htaccess saying that the file should be server parsed. Or, you can change your extension to *.shtml. I used to do that, actually...
I would just recommend using PHP.
-
Oct 9, 2004, 10:01 #7
- Join Date
- Mar 2004
- Location
- West Midlands, United Kingdom
- Posts
- 2,631
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Damn, i forgot that bit, they guy in the post before said the extension would need to be .shtm
-
Oct 9, 2004, 10:01 #8
- Join Date
- Dec 2003
- Location
- Albany, New York
- Posts
- 1,355
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I think *shtm and *.shtml are the same... like *.htm and *.html
-
Oct 9, 2004, 10:04 #9
- Join Date
- Mar 2004
- Location
- West Midlands, United Kingdom
- Posts
- 2,631
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
sorry, that was just a typo..... i did mean to typ .shtml!
-
Oct 9, 2004, 11:09 #10
- Join Date
- Feb 2004
- Location
- Grahamstown
- Posts
- 634
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
yeah. problem is im making the site for a friend who has never done any coding before. so i want to keep it simple and let them just use dreamweaver to update their webpage. using php means that they need to have php installed on their computer and understand localhost and all that.
I guess i could just tell them to make the changes in dreamweaver and test it live though...
The site is for a campus society, using the varsity alotted webspace, so they get min permissions on the server, im pretty sure they dont get access to .htaccess files.
Thanks for your help though.
post in the HTML forum, they may be able to help
-
Oct 9, 2004, 11:11 #11
- Join Date
- Feb 2004
- Location
- Grahamstown
- Posts
- 634
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Young Twig
-
Oct 9, 2004, 11:45 #12
- Join Date
- Mar 2004
- Location
- West Midlands, United Kingdom
- Posts
- 2,631
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
yeah, thats right...... I should imagine that the server supports it!
Bookmarks