Logo.gif

`include' experiment

home
page1
page2
page3
subDirectory
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" -->:

    This stuff is in file "common/inclusion1.txt". It can be included in many "server-side-include", shtml pages, e.g. to give common background information, policy statements, addresses, or other information that is common to all or to many pages. Edit once, appears often.

    This inclusion is in a text file, to be edited with `vi', `emacs', `notepad' or the like. It can contain HTML tag's but keep it simple!

  2. <!--include file="../common/inclusion1.txt" -->:
    [an error occurred while processing this directive]

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

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

    This stuff is in file "common/inclusion1.txt". It can be included in many "server-side-include", shtml pages, e.g. to give common background information, policy statements, addresses, or other information that is common to all or to many pages. Edit once, appears often.

    This inclusion is in a text file, to be edited with `vi', `emacs', `notepad' or the like. It can contain HTML tag's but keep it simple!

    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]

File common/footer.txt e.g. address and other contact information.
School of Computer Science and Software Engineering, Monash University, Australia 3168.