Server-Side Includes
Similar to preprocessing directives, Server-Side Includes allow you to include various values (for instance, the last modified date of a file) or a complete file in your script. The following are the Server-Side Include directives supported by IIS:
-
#config Configures the format for error messages, dates, and file sizes as they are returned to the client browser
-
#echo Inserts the value of an environment variable (equivalent to the various elements of the Request object's ServerVariables collection) into a client's HTML page
-
#exec Inserts the results of a command-line shell command or application
-
#flastmod Inserts the last modified date/time for the current page
-
#fsize Inserts the file size of the current file
-
#include Includes the contents of another file into the current file
All directives are allowed in HTML. Only the
#include directive, however, is allowed in both
HTML and ASP pages. The #include directive is the
only one detailed here.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access