Logo.gif

`include' experiment

Server Side Includes

Three includes below, the first from this directory, the last two "up and across" in another directory using `file=' and `virtual=' respectively.

  1. <!--include file="common/inclusion1.txt" -->:
  2. <!--include file="../common/inclusion1.txt" -->:

    Note the `../'. If this last directive failed, see [here] for a discussion why.

  3. <!--include virtual="../common/inclusion1.txt" -->:

    Note the `virtual="../'

(See [apache] on <!--include ...
This command inserts the text of another document or file into the parsed file. Any included file is subject to the usual access control. If the directory containing the parsed file has the Option IncludesNOEXEC set, and the including the document would cause a program to be executed, then it will not be included; this prevents the execution of CGI scripts. Otherwise CGI scripts are invoked as normal using the complete URL given in the command, including any query string.
file=
The value is a path relative to the directory containing the current document being parsed. It cannot contain ../, nor can it be an absolute path. The virtual attribute should always be used in preference to this one. (#@!?)
virtual=
The value is a (%-encoded) URL relative to the current document being parsed. The URL cannot contain a scheme or hostname, only a path and an optional query string. If it does not begin with a slash (/) then it is taken to be relative to the current document.
--> [10/2000]

[source HTML]