Using Server Side Include CommandsServer Side Include (SSI) commands are executed by the server as it parses your HTML file. Server Side Includes can be used to include the value of various server environment variables within your HTML such as the local date and time. One might use a Server Side Include to add a signature file to a HTML file or company logo. HTML files containing SSI must be named with a .shtml extension. (NT accounts can use .shtml, .shtm, and .stm) SSI commands are easy to add to your HTML, but you must follow the syntax exactly:
Be sure to leave a space after the ending quotation mark (") of the argument variable. Using the echo CommandThe echo command can be used to display the content of the five server side environment variables listed in the table below.
Example: This code: <!--#echo var="Date_Local"
--> On NT, the "echo" date commands do not include the time, unless #config timeframe="time options" is used first. Using the config CommandThe config command can be used to configure the standard output of various environment variables. In the following example, two SSI commands are used in conjunction to produce an alternative date and time format: This code: <!--#config timefmt="%A, %B %d, %Y
%I:%M%p" --> <!--#echo var="date_local" --> Here is a breakdown of the date and time codes used in the example above:
Other SSI CommandsThe fsize command might be helpful if you were to include a thumbnail image and want to display the actual file size of the original image.
The include command can be used to include a signature file or company logo within an HTML document. The added document or image will appear as if it were part of the original document.
If the file to be included is in a different directory than the SHTML document use the virtual command argument instead. In the following example, the SHTML document resides in a subdirectory but includes a file within the account root directory:
The exec command can be used to execute a CGI script when the web page is loading. In the following example, the script date.pl within the relative path /cgi-local is executed.
You could also use the virtual command instead if you need to pass
values to the script: This is more or less a get your feet wet page. To take the plunge, check out these sites.
|
Home | Custom PCs | Website Design | Website Hosting | Support | Contact Info | Feedback