Jump to content

This is the support site for Andrews & Arnold Ltd, a UK Internet provider. Information on these pages is generally for our customers but may be useful to others, enjoy!

Webhosting Server Side Includes: Difference between revisions

The workaround only applies to #include
mNo edit summary
(The workaround only applies to #include)
 
(One intermediate revision by one other user not shown)
Our servers do not offer SSI facilities. <code>&lt;!--#include virtual="ssi.htm"SSI --></code>provides ora <code>&lt;!--#includesimple file="ssi.htm"programming --></code>,language howeverto youdo cana createlimited theset sameof effectoperations byon using Javascripttext. These notesFor wereexample, submittedincluding byother aHTML customerfiles, andor areprinting here toHTTP helpenvironment youvariables.
 
E.g.
* <code>&lt;!--#include virtual="ssi.htm" --></code> or <code>&lt;!--#include file="ssi.htm" --></code>
* <code>&lt;!--#echo var="LAST_MODIFIED" --></code>
 
You can create the same effect for includes by using Javascript (although these will be actually be client side includes). These notes were submitted by a customer and are here to help you.
 
How?
 
First:
Include the following in the <code>&lt;head>&lt;head></code> section of your page
 
<SyntaxHighlight lang="html">
<SCRIPT language="JavaScript" > </SCRIPT>
</SyntaxHighlight>
 
and
<SyntaxHighlight lang="html">
<script type="text/javascript" src="myincludefilename.js"> </SCRIPT>
</SyntaxHighlight>
 
with your own file name substituted where you want the included text to appear.
 
 
Then:
 
The javascript file can have any extension, and be held in any folder subject to the usual rules about valid pathnames.
 
 
Example: Good
 
<SyntaxHighlight lang="js">
document.write("James Brown is in the office <br>");
 
Example: Bad
 
<SyntaxHighlight lang="js">
document.write("James Brown is in the office <br>
 
 
A web search on 'javascript include' will bring up lots more examples.
 
==Other Webhosting pages==
<ncl style=bullet maxdepth=5 headings=bullet headstart=2 showcats=1 showarts=1>Category:Webhosting</ncl>
 
[[File:aa-button.png|link=http://aa.net.uk/domains-webspace.html|Webhosting Service page on our main website]]
editor
471

edits