SSI - Server Side Includes
файлах сервера:
/etc/httpd/conf/access.conf :------------------------
<Directory /home/httpd/docs> # "Включить"
Options All # Options Includes
/etc/httpd/conf/srm.conf :------------------------
AddType text/x-server-parsed-html .shtml
или даже
AddType text/x-server-parsed-html .html
Примеры:
<!--#exec cmd="ls -l" -->
<!--#include virtual="bottom.html" -->
<!--#element attribute=value attribute=value ... -->
The value will often be enclosed in double quotes; many commands only allow a single attribute-value pair.
The allowed ELEMENTS are:
Include variables
These are available for the echo command, and to any program
invoked by the document.
The current date in Greenwich Mean Time.
The current date in the local time zone.
The filename ( excluding directories) of the document requested
by the user.
The (%-decoded) URL path of the document requested by the user.
Note that in the case of nested
include files, this is not then URL for the current document.
The last modification date of the document requested by the user.
If server side includes are enabled, you will see data values below:
The date is: <!--#echo var="DATE_LOCAL"-->
The current version of the server <!--#echo var="SERVER_SOFTWARE"-->
The CGI gateway version <!--#echo var="GATEWAY_INTERFACE"-->
The server name <!--#echo var="SERVER_NAME"-->
This file is called: <!--#echo var="DOCUMENT_NAME"-->
This file's URI <!--#echo var="DOCUMENT_URI"-->
The query string <!--#echo var="QUERY_STRING_UNESCAPED"-->
This file was last modified: <!--#echo var="LAST_MODIFIED" -->
The size of the unprocessed file <!--#fsize virtual="httpd.txt"-->
sample.html was last modified <!--#flastmod virtual="httpd.txt"-->
You are using <!--#echo var="HTTP_USER_AGENT"-->
You came from <!--#echo var="HTTP_REFERER"-->