|
Free Stuff: links: Neue Surf Tips : know-how : Zitate : Spam Strike : HTML Checker! : Link Checker : Cartoons About IC: friends: lust und frust : guestbook : what's new |
|
This page demonstrates most of WebSite's server-side include capabilities. The file ssi-incl.txt is located in the same directory as this file, accessible via URL as /wsdocs/32demo/ssi-incl.txt. It contains the text This came from a text file and a CRLF. Since the display is in "preformatted ( ) format, line terminators are significant, so there are blank lines after those items. The CGI program ssicgi.exe simply generates Hello World with no HTTP headers at all. If your CGI program generates HTTP headers, they will appear in the output. First, we set some SSI configuration variables
as shown. Note that you can put comments inside the SSI
directives after the directive itself: <!--#config timefmt="%c" use short date/time --> <!--#config sizefmt="%d bytes"--> <!--#config errmsg="##ERROR!##"--> Then we use SSI directives. The directives are shown followed by the substituted output resulting from these directives. : SSI DIRECTIVE RESULT --------------------------------------------------------------------------------------------- <!--#daycnt-->5 <!--#totcnt-->386 <!--#lastzero-->07/09/96 08:41:02 <!--#exec cgi="/cgi-win/ssicgi.exe"-->Hello World <!--#include virtual="/wsdocs/32demo/ssi-incl.txt"-->This came from a text file<br> <!--#include file="ssi-incl.txt"-->This came from a text file<br> <!--#fsize virtual="/wsdocs/32demo/ssi-incl.txt"-->28 bytes<br> <!--#fsize file="ssi-incl.txt"-->28 bytes<br> <!--#flastmod virtual="/wsdocs/32demo/ssi-incl.txt"-->05/31/96 16:45:40<br> <!--#flastmod file="ssi-incl.txt"-->05/31/96 16:45:40<br> <!--#echo var="DOCUMENT_NAME"-->C:\WebSite\wsdocs\32demo\ssi.html-ssi<br> <!--#echo var="DOCUMENT_URI"-->/wsdocs/32demo/ssi.html-ssi<br> <!--#echo var="LAST_MODIFIED"-->05/31/96 16:45:40<br> <!--#echo var="QUERY_STRING"--><br> <!--#echo var="QUERY_STRING_UNESCAPED"--><br> <!--#echo var="DATE_LOCAL"-->08/14/98 11:01:22<br> <!--#echo var="SERVER_SOFTWARE"-->WebSitePro/1.1h<br> <!--#echo var="SERVER_NAME"-->adminweb.ucis.dal.ca<br> <!--#echo var="SERVER_PROTOCOL"-->HTTP/1.0<br> <!--#echo var="REQUEST_METHOD"-->GET<br> <!--#echo var="REMOTE_HOST"-->proxy.swisscom.com<br> <!--#echo var="HTTP_ACCEPT"-->image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, */*<br> <!--#echo var="HTTP_USER_AGENT"-->Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)<br> <!--#echo var="REFERER"-->http://www.altavista.digital.com/cgi-bin/query<br> <!--#echo var="BOGUS"-->##ERROR!##<br> How to enable Server-side Includes on Apache?At global context:# To use server-parsed HTML files AddType text/html .shtml .shtm .html AddHandler server-parsed .shtml .shtm .html At VirtualHost section:
# server-side includes:
<Files ~ "\.(html|shtml?)$">
Options +Includes
</Files>
|
|||||||
|
Know-How home
| Must Read
| What's new?
| iC Site Map link search |
©1998-2004 infoCopter
|