Forum Moderators: not2easy
Example:
<!--#include file="footer.html" -->
There's more to it than that, but that include tag would cause the contents of the file "footer.html" to be inserted into another HTML file.
I'm guessing that you want to create one external file that you can import into every (or many) html files
If so, consider javascript:
e.g.
JAVASCRIPT
============
/* myFooterFile.js */
document.write('<p class="foo"> '
+ 'Copyright © 2007 My_Business_Name - All Rights Reserved '
+ '<\/p>'
+ '<p>'
+ '<a href="http://www.example.com/one.html" '
+ 'title="External Link: example"> '
+ 'example 01<\/a> '
+ '<br\/> '
+ '<a href="http://www.example.com/two.html" '
+ 'title="External Link: example"> '
+ 'example 02<\/a> '
+ '<\/p>'
);
_________________________________
HTML
==========
<div id="myFooter">
<script type="text/javascript" src="myScriptsFolder/myFooterFile.js"></script>
<noscript>
This feature requires Javascript to be enabled in your browser
</noscript>
</div>
</body>
</html>
<?php include ("includes/bottomnav.php");?>
It'll by styled by the existing CSS and your current file extensions can stay the same.
[edited by: Marcia at 10:32 am (utc) on Oct. 29, 2007]
However, I immediately encountered one problem:
my win xp HOME machine has no IIS (or similar) so I can't SEE the include on my local machine :(
So... I have started a thread:
Which Apache for WinXP Home?
to support PHP [webmasterworld.com]
All advice welcome