home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / WEBSERVE / PI3 / PI3WEB.EXE / Pi3Docs / FEATURES / TESTSSI.SSI < prev   
Text File  |  1997-10-06  |  8KB  |  183 lines

  1.  
  2. <HTML>
  3. <TITLE>Pi3Web Feature Suite - SSI Test Page </TITLE>
  4. <BODY BACKGROUND="/icons/Pi3Tile.gif"BGCOLOR="#FFFFFF">
  5. <CENTER><H1>Pi3Web Feature Suite - SSI Test Page</H1></CENTER>
  6. This is a page for testing server side includes.
  7. <A NAME="__index">
  8. <UL>
  9. <LI><A HREF="#config">Configuration Directives</A>
  10. <LI><A HREF="#vars">Standard Variables</A>
  11. <LI><A HREF="#includes">File Inclusion</A>
  12. <LI><A HREF="#exec">SSI CGI execution</A>
  13. <LI><A HREF="#misc">Miscellanious</A>
  14. <LI><A HREF="#pi3ext">Pi3Web Extension Directives</A>
  15. </UL>
  16. <BR>Return to <A HREF="index.htm">main features index</A>.<HR SIZE=1 NOSHADE>
  17.  
  18. <!--
  19. Configuration Directives
  20. --->
  21. <A NAME="config">
  22. <H2>Configuration Directives</H2>
  23. The following directives don't yield a result but change the way other 
  24. directives are formatted, or change the error message.
  25. <PRE>
  26. <!--
  27.           111111111122222222223333333333444444444455555555556666666666777777777
  28. 0123456789012345678901234567890123456789012345678901234567890123456789012345678
  29. -->
  30. <B>Directive</B>                               <B>Action</B>
  31. <HR SIZE=1 NOSHADE>
  32. <!--#config errmsg="/** Error! **/"-->  <!--#config errmsg="/** Error! **/"-->Change value given for SSI errors.
  33. <!--#config timefmt="%c"-->             <!--#config timefmt="%c"-->Set the format of dates and times (in strftime() format).
  34. <!--#config sizefmt="%d"-->             <!--#config sizefmt="%d"-->Set the format of sizes (in printf() format).
  35. </PRE>
  36. <P>Return to <A HREF="#__index">SSI index</A>.
  37.  
  38. <!--
  39. Standard Variables
  40. --->
  41. <A NAME="vars">
  42. <H2>Standard Variables</H2>
  43. Simple variable substitution can be achieved using the 'echo' directive. This
  44. is moderately efficient and should be used over more expensive mechanisms 
  45. (such as file inclusion and particularly CGI inclusion) where possible.
  46. <PRE>
  47. <!--
  48.           111111111122222222223333333333444444444455555555556666666666777777777
  49. 0123456789012345678901234567890123456789012345678901234567890123456789012345678
  50. -->
  51. <B>Directive</B>                               <B>Result</B>
  52. <HR SIZE=1 NOSHADE>
  53. <B><I>SSI specific variables</I></B>
  54. <!--#echo var="DOCUMENT_NAME"-->        <!--#echo var="DOCUMENT_NAME"-->
  55. <!--#echo var="DOCUMENT_URI"-->         <!--#echo var="DOCUMENT_URI"-->
  56. <!--#echo var="DATE_GMT"-->             <!--#echo var="DATE_GMT"-->
  57. <!--#echo var="DATE_LOCAL"-->           <!--#echo var="DATE_LOCAL"-->
  58. <!--#echo var="LAST_MODIFIED"-->        <!--#echo var="LAST_MODIFIED"-->
  59.  
  60. <B><I>Variables in common with CGI</I></B>
  61. <!--#echo var="AUTH_TYPE"-->            <!--#echo var="AUTH_TYPE"-->
  62. <!--#echo var="CONTENT_LENGTH"-->       <!--#echo var="CONTENT_LENGTH"-->
  63. <!--#echo var="CONTENT_TYPE"-->         <!--#echo var="CONTENT_TYPE"-->
  64. <!--#echo var="PATH_INFO"-->            <!--#echo var="PATH_INFO"-->
  65. <!--#echo var="PATH_TRANSLATED"-->      <!--#echo var="PATH_TRANSLATED"-->
  66. <!--#echo var="QUERY_STRING"-->         <!--#echo var="QUERY_STRING"-->
  67. <!--#echo var="REMOTE_ADDR"-->          <!--#echo var="REMOTE_ADDR"-->
  68. <!--#echo var="REMOTE_HOST"-->          <!--#echo var="REMOTE_HOST"-->
  69. <!--#echo var="REMOTE_IDENT"-->         <!--#echo var="REMOTE_IDENT"-->
  70. <!--#echo var="REMOTE_USER"-->          <!--#echo var="REMOTE_USER"-->
  71. <!--#echo var="REQUEST_METHOD"-->       <!--#echo var="REQUEST_METHOD"-->
  72. <!--#echo var="SERVER_NAME"-->          <!--#echo var="SERVER_NAME"-->
  73. <!--#echo var="SERVER_PORT"-->          <!--#echo var="SERVER_PORT"-->
  74. <!--#echo var="SERVER_PROTOCOL"-->      <!--#echo var="SERVER_PROTOCOL"-->
  75. <!--#echo var="SERVER_SOFTWARE"-->      <!--#echo var="SERVER_SOFTWARE"-->
  76.  
  77. <B><I>Extra header variables</I></B>
  78. <!--#echo var="HTTP_ACCEPT"-->          <!--#echo var="HTTP_ACCEPT"-->
  79. <!--#echo var="HTTP_USER_AGENT"-->      <!--#echo var="HTTP_USER_AGENT"-->
  80. <!--#echo var="REFERER"-->              <!--#echo var="REFERER"-->
  81.  
  82. <B><I>Non-standard additions</I></B>
  83. <!--#echo var="ERROR_MESSAGES"-->       <!--#echo var="ERROR_MESSAGES"-->
  84. <!--#echo var="SERVER_ADMIN"-->         <!--#echo var="SERVER_ADMIN"-->
  85.  
  86. <B><I>Test what happens for an unknown variable</I></B>
  87. <!--#echo var="UNKNOWN"-->              <!--#echo var="UNKNOWN"-->
  88. </PRE>
  89. <P>
  90. Return to <A HREF="#__index">SSI index</A>.
  91. <BR><HR SIZE=1 NOSHADE>
  92. Return to <A HREF="index.htm">main features index</A>.
  93.  
  94. <!--
  95. File inclusion
  96. --->
  97. <A NAME="includes">
  98. <H2>File Inclusion</H2>
  99.  
  100. Server side includes allows files may be included into the main file. Other
  101. directives to return the filesize (using the format optionally set by
  102. the <CODE>#config sizefmt="..."</CODE> directive) or the files last modification date
  103. (using the format optionally set by the <CODE>#config timefmt="..."</CODE>).
  104. <PRE>
  105. <!--
  106.           111111111122222222223333333333444444444455555555556666666666777777777
  107. 0123456789012345678901234567890123456789012345678901234567890123456789012345678
  108. -->
  109. <B>Directive</B>                                                   <B>Result</B>
  110. <HR SIZE=1 NOSHADE>
  111. <!--<B><I>SSI specific variables</I></B>-->
  112. <!--#include virtual="/pidocs/features/include.txt"-->      <!--#include virtual="/pidocs/features/include.txt"-->
  113. <!--#include file="include.txt"-->                          <!--#include file="include.txt"-->
  114. <!--#fsize virtual="/pidocs/features/include.txt"-->        <!--#fsize virtual="/pidocs/features/include.txt"-->
  115. <!--#fsize file="include.txt"-->                            <!--#fsize file="include.txt"-->
  116. <!--#flastmod virtual="/pidocs/features/include.txt"-->     <!--#flastmod virtual="/pidocs/features/include.txt"-->
  117. <!--#flastmod file="include.txt"-->                         <!--#flastmod file="include.txt"-->
  118. <HR SIZE=1 NOSHADE>
  119. </PRE>
  120. <P>Return to <A HREF="#__index">SSI index</A>.
  121.  
  122. <!--
  123. SSI CGI Execution
  124. --->
  125. <A NAME="exec">
  126. <H2>SSI CGI Execution</H2>
  127. The output from CGI programs can also be included with SSI's by using the
  128. 'exec' directive.
  129. <PRE>
  130. <!--
  131.           111111111122222222223333333333444444444455555555556666666666777777777
  132. 0123456789012345678901234567890123456789012345678901234567890123456789012345678
  133. -->
  134. <B>Directive</B>                                         <B>Action</B>
  135. <!--#exec virtual="/cgi-bin/Echo.exe"-->          <!--#exec virtual="/cgi-bin/Echo.exe"-->
  136. <!--#exec file="../../cgi-bin/Echo.exe"-->        <!--#exec file="../../cgi-bin/Echo.exe"-->
  137. <!--#exec virtual="/cgi-bin/Hello.exe"-->         <!--#exec virtual="/cgi-bin/Hello.exe"-->
  138. <!--#exec file="../../cgi-bin/Hello.exe"-->       <!--#exec file="../../cgi-bin/Hello.exe"-->
  139. <HR SIZE=1 NOSHADE>
  140. </PRE>
  141. <P>Return to <A HREF="#__index">SSI index</A>.
  142.  
  143. <!--
  144. Miscellanious
  145. --->
  146. <A NAME="misc">
  147. <H2>Miscellanious</H2>
  148. We do some miscellanious things also.
  149. But they are not documented.
  150. <PRE>
  151. <!--
  152.           111111111122222222223333333333444444444455555555556666666666777777777
  153. 0123456789012345678901234567890123456789012345678901234567890123456789012345678
  154. -->
  155. <B>Directive</B>                               <B>Action</B>
  156. <HR SIZE=1 NOSHADE>
  157. </PRE>
  158. <P>Return to <A HREF="#__index">SSI index</A>.
  159.  
  160. <!--
  161. Pi3Web Extension Directives
  162. --->
  163. <A NAME="pi3ext">
  164. <H2>Pi3Web Extension Directives</H2>
  165. Pi3Expressions may be evaluated inline in server-side includes. This 
  166. offers greater flexibility over simpler variable expansion (using the
  167. <CODE>#echo</CODE> directive). However where appropriate, simple
  168. variable expressions should be used instead of Pi3Expression because of
  169. the increased overhead of parsing and evaluating them.
  170. <PRE>
  171. <!--
  172.           111111111122222222223333333333444444444455555555556666666666777777777
  173. 0123456789012345678901234567890123456789012345678901234567890123456789012345678
  174. -->
  175. <B>Directive</B>                                                   <B>Result</B>
  176. <!--#Pi3ext expr="(Process, thread) ($P/$k)"-->             <!--#Pi3ext expr="(Process/thread) ($P/$k)"-->
  177. <!--#Pi3ext expr="Debugging is &if($d,on,off)"-->           <!--#Pi3ext expr="Debugging is &if($d,on,off)"-->
  178. <HR SIZE=1 NOSHADE>
  179. </PRE>
  180. <P>Return to <A HREF="#__index">SSI index</A>.
  181. <BR>Return to <A HREF="index.htm">main features index</A>.<HR SIZE=1 NOSHADE>
  182.  
  183.