Previous Thread
Next Thread
Print Thread
Rate Thread
#104286 10/03/2001 3:16 PM
Joined: Sep 2000
Posts: 4,211
Master Hacker
Master Hacker
Joined: Sep 2000
Posts: 4,211
It should come as no surprise that the function of SSI depends heavily on the configuration of the server. My instructions use SSI commands that work for NCSA HTTPd Server Side Includes, and specifically, those documented in the Apache server's mod_include module.

Server Side Include commands have the following format:
Code
code:
The element is one of the predefined functions that Server Side Includes can perform, such as include or echo.

The command also includes one or more attribute/value pairs that provide the specific parameters to the function.

There are a few important things to note about SSI command syntax:
  • The whole command must be enclosed within comment indicators ().
  • The comment terminator (-->) must be preceded by a space to make it clear that it is not part of the SSI information.
  • Keep the whole command on one line (line breaks between the comment tags may cause the SSI not to function).
  • The # symbol is an important part of the command and must not be omitted.



Example: Virtual Includes

The simplest type of Server Side Include is a "virtual include," which tells the server to add information to a file before sending it to the browser.

Code
code:

The command in the above example uses the include element, which inserts the text of another document into the parsed file. The include element uses the virtual parameter to specify the URL of the document to be inserted, in this case, navtable.html.

Many webmasters label these fragment files with the .htmlf suffix to keep them distinct from normal HTML documents, although it's not necessary.

Example: Executing Scripts

exec cmd|cgi="string"

Executes external programs and inserts the output in the current document.

Attributescgi - Provides the relative URL path to the CGI script.
Code
code:

cmd - Specifies any shell program on the server. The SSI variables are available to the command.
Code
code:

One Last Note on Virtual Includes

The virtual attribute specifies a URL relative to the document being parsed. The URL cannot contain a scheme or hostname. If it does not begin with a slash (/) it is taken to be relative to the current document.

[ 10-03-2001: Message edited by: Matt Jacob ]

Sponsored Links
Entire Thread
Subject Posted By Posted
SSI Problems. Ruben Rocha 08/12/2001 8:18 PM
Re: SSI Problems. Splitfyre 08/14/2001 8:40 AM
Re: SSI Problems. WNxWakko 09/27/2001 5:45 AM
Re: SSI Problems. RussellK 09/30/2001 5:58 AM
Re: SSI Problems. Ruben Rocha 10/02/2001 8:56 PM
Re: SSI Problems. Matt Jacob 10/03/2001 10:16 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,575
Posts293,931
Members13,823
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)