![]() |
|
|
#1
|
||||
|
||||
|
wanna include footer.txt in html
wanna include footer.txt in html pages
i don know the exact syntax it was like <#include...i don remember it can anyone tell me the exact syntax for it |
|
#2
|
||||
|
||||
|
You cannot include other files into HTML pages. They have tp be parsed and the correct way to parse them is renaming them to SHTM or SHTML. If you are on a *NIX server, you can tell the server to parse all HTML pages, but this puts un-do load on your servers.
The code could be: Code:
<!--#include file="footer.txt" --> Code:
<!--#include virtual="../footer.txt" --> |
|
#3
|
||||
|
||||
|
Why not just use php and include the text?
|
|
#4
|
||||
|
||||
|
yes, include as PHP, and set in your .htaccess the document type for HTM and HTML to be PHP, so that all HTML files are parsed as php documents.
|
|
#5
|
||||
|
||||
|
honey,
can you provide the .htaccess code necessary to do that? |
|
#6
|
||||
|
||||
|
Per Running PHP on a html or htm page
Code:
AddType application/x-httpd-php .html .php .htm |
|
#7
|
|||
|
|||
|
Include footer.text in html
Assume this file is index.htm:
<td class="footercenter" width="800" height="78"> <!--webbot bot="Include" u-include="include_footer.htm" tag="BODY" startspan --> <a href='index.htm'><font face='Arial Unicode MS'>Home </font></a> (content of include_footer.htm file) <!--webbot bot="Include" i-checksum="57741" endspan --></td> Remarks: Use Frontpage to edit file include_footer.htm. And then open index.htm in Frontpage environment and it should already updated with the changes made in include_footer.htm(if any). Now just save index.htm. ftp both files to a web server. If you have many pages using this footer info, now you can just update the footer file instead of saving all the trouble to update each file(which has the footer info written in the conventional way). |
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HTML Invoice shows HTML markup | davet | Bugs | 7 | Mar 14th 2009 5:06 am |
| Weird HTML email problem | crazyhorse | Site & Server Administration | 15 | Nov 1st 2005 4:07 am |
| Do SEs love html extension ? | Tuning | Site & Server Administration | 2 | Apr 11th 2005 10:35 pm |
| html editors, advice? | Christopher | All Other Tools | 8 | Mar 25th 2005 10:25 pm |
| Ad PHP script executes in HTML page, outputs nothing | tigertom | Setup / Validation Help | 12 | Mar 20th 2005 2:23 pm |