Home »
Web
»
Web Site Management
Read the article that everyone's commenting on.
Subscribe to the RSS Feed for comments on this article.
Check with your host - it may need to be enabled, or it may only be enabled for certain file extensions (like .shtml).
Posted by: Leo at June 11, 2006 3:24 PMI use the code
as u mensioned. and also
tested.
in my main html page. but it doesn't work.
I want to include my common header in to all pages.
Please help me.
Thanks
dear Leo
i have got three files help.htm ,contact.php and ..inc
i have called the inc file inside teh php file
now i want to call this php file inside teh htm file , i.e when i click help.htm the contents of contact.php should called
i tried the below mentioned php tag on help.htm but all in vain. apprecaite your invaluable assistance
AXIS Engineering Consultants
Posted by: Kris at September 7, 2006 6:29 AMThat type of include (<?) needs to happen in a PHP file, you have it in an HTML file. You probably need to use SSI include. The style of include needs to match the type of source file, not the type of file being included.
Posted by: Leo Notenboom at September 7, 2006 11:36 AMI've idea about how to write include syntax in a html file. http://www.seobbsr.com/
Posted by: T.ashok kumar at May 12, 2007 4:30 AMHi Leo, thanks for this informative article.
Suggestion to all those who want to include html in html and don't know much about servers, php and or ssi: Use the client-side method described here. It's easy and it works as long as Javascript is not disabled on the visitors browser. For this case you still can add this:
<noscript>Please enable Javascript in your Browsersettings!</noscript>
cheers
Posted by: jfk at May 25, 2007 7:29 AMThank-you for the helpful info on %includes.
I've used them in programming in other non-web languages (PL1, JCL PL/SQL etc), but not in web context.
Text at top/left of web pages often contributes to a page's ranking for search engines. If this text is removed, a menu for example, to a seperate document (by any of the described methods) will this likely mean the page has a lower ranking with such keyword text omitted?
Posted by: David Smith at July 29, 2007 2:19 AMI READ THIS ARTICLE, IT DOESN'T HELP AT ALL FOR CLIENT SIDE SCRIPTS aka INCLUDING A FILE IN ANOTHER FILE...
HERE IS A VERY HELPFUL ARTICLE:
http://www.moock.org/webdesign/javascript/client-side-include/index.html
Posted by: HELPFUL at November 23, 2007 8:22 PMI finally got my problem solved, which was not only a client side include, but a client side include where I had to calculate which include to include. (Did I make myself clear or what? ;-> )
I wanted to include the daily watchwords (see www.ebu.org) in my "Outlook Today" page.
This is my code (I hope it shows well):
function fuehrendeNull(wert)
{
if (wert")
If the cite-tags are showed, they are the ones which shouldn't show...
If it doesn't show at all or only very strange, my trick is to do a "document.write" that writes ANOTHER "script"-Statement, in which the variable is inserted.
Well, the code didn't show really well.
Here it is again, only with much less
To post a comment on "How do I include one HTML file inside another?", please return to that article's main page.