Html: Difference between revisions

From miki
Jump to navigation Jump to search
(Created page with "== References == * [http://www.boutell.com/newfaq/creating/include.html WWW FAQs: How do I include one HTML file in another?]")
 
Line 1: Line 1:
== References ==
== References ==
* [http://www.boutell.com/newfaq/creating/include.html WWW FAQs: How do I include one HTML file in another?]
* [http://www.boutell.com/newfaq/creating/include.html WWW FAQs: How do I include one HTML file in another?]

== Include another file ==
;Using server-side include
:If it doesn't work, TRY NAMING THE FILE WITH A {{file|.shtml}} EXTENSION!
<source lang=html4strict>
<!--#include file="insertthisfile.html" -->
<!--#include virtual="insertthisurl_cgi.html" -->
</source>

;Using server-side include - PHP
:We can also use PHP, if the server is configured for it:
<source lang=html4strict>
<?php include("filename.html"); ?>
<?php include("http://www.othersite.com/filename.html"); ?>
</source>

Revision as of 07:14, 12 January 2016

References

Include another file

Using server-side include
If it doesn't work, TRY NAMING THE FILE WITH A .shtml EXTENSION!
<!--#include file="insertthisfile.html" -->
<!--#include virtual="insertthisurl_cgi.html" -->
Using server-side include - PHP
We can also use PHP, if the server is configured for it:
<?php include("filename.html"); ?>
<?php include("http://www.othersite.com/filename.html"); ?>