<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> New Mexico Server Side Includes
hosting support
 

hosting support

 How do I get started?
 Domain transfer
 Is my domain active?
_ _ 403 Errors
_  _Site Viewing
f    My Page Shows Blank
 E-mail setup
_  _Outlook Express
_  _Netscape

 Web Based Email
_  _What is it?
_  _Sending Email
_  _Deleting Email
_  _Address Book
_  _Languages
  __Signatures
_  _Mailbox locked
 PHP
_  _What is it?
_  _Examples
 FTP
 Control panel
_  _Password protecting
_  _File permissions
_  _Updating details
 Custom errors
 Perl/CGI scripts
 SSI (Server-side      includes)
__  Syntax
__  Example
 Frontpage
 Database use
 Securing your data
_  _Backing up
_  _Protecting your       password
 JSP (Java server       pages)
 Account Information
_   System Abuse
 CDO for NTS
 Site statistics
 Send Mail
 How do I
       Check disk-space?
       Unix/Linux-NT4
       Win2k
       Check bandwidth?
       Install custom          
          components?



 


Server Side Includes

Server Side Includes (SSI) allows the insertion of dynamic data into .html documents.

How to Use

Since parsing SSI is CPU intensive, only specially marked files are processed in order to not sacrifise performance.Only files ending with .shtml are processed for SSI directives
The following commands are support under our implementation:
#config
Configures the SSI environment. The environment is reset for each SSI document. You can configure the error message, the size format and the time format.
#echo
Inserts the value of a variable. Supported environment variables include:
DOCUMENT_NAME
DOCUMENT_URI
QUERY_STRING_UNESCAPED
DATE_LOCAL
DATE_GMT
LAST_MODIFIED
SERVER_SOFTWARE
SERVER_NAME
GATEWAY_INTERFACE
SERVER_PROTOCOL
SERVER_PORT
REQUEST_METHOD
PATH_INFO
PATH_TRANSLATED
SCRIPT_NAME
QUERY_STRING
REMOTE_HOST
REMOTE_ADDR
AUTH_TYPE
REMOTE_USER
REMOTE_IDENT
CONTENT_TYPE
CONTENT_LENGTH
For example, the following line will insert the current time and date:
<!--#echo var="DATE_LOCAL"-->
#exec
Executes a program and inserts its output into the document. Use the cgi keyword for URL-based scripts and the cmd keyword for system commands. The SSI #exec method uses Standard CGI only. This means that if you are using Perl (or any other external processor), only the Standard CGI configured extension will work. this means that if you process .pl with Perl ISAPI, it will not work under SSI. Example usage:
<!--#exec cgi="/cgi-bin/hello.pl"--> [insecure]
#flastmod
Returns the date of the last modification to the specified file. Use the virtual keyword for URL-based files and the file keyword for path based files. Example usage:
<!--#flastmod virtual="stuff/extra.txt"-->
<!--#flastmod file="c:\mystuff\extra.txt"--> [insecure]
#fsize
Inserts the size of a file. Use the virtual keyword for URL-based files and the file keyword for path based files. Example usage:
<!--#fsize virtual="stuff/extra.txt"-->
<!--#include file="d:\website\yourdomaincom\mystuff\extra.txt"-->
#include
Inserts a file into the document. You may nest documents up to 8 layers. Use the virtual keyword for URL-based includes and the file keyword for path based includes. Example usage:
<!--#include virtual="stuff/extra.txt"-->
<!--#include file="d:\website\yourdomaincom\mystuff\extra.txt"-->

An Example

Now, we shall create a SSI-driven page! Open Notepad and copy-paste the following information:
<font size="1"><b>This page is basic html <a href="http://support.nshosts.com/hhssi.html">Click here</a> to the SSI help page<b></font>
Save the file as ssi.htm. Click here to view ssi.htm
Now open a new document and copy-paste the following code:
<HTML>
<HEAD>
<TITLE>Test SSI-Page</TITLE>
</HEAD>
<BODY>
<!--#include file="ssi.htm" -->
</BODY>
</HTML>
Save that file as ssi-test.shtml Click here to view ssi-test.shtml
Upload both files to your Web Server and preview them in your browser and test.
 
hosting support
   


Home
 | Compare Plans | E-commerce Hosting
Ordering | Support | Additional Items
Our Network | Site Design | E-commerce Solutions | About Us | Contact Us

Acceptable Use Policy (AUP) Terms Of Use (TOS) | 99.99% Uptime Guarantee