Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Pages: [1]   Go Down
Print
Author Topic: SSI usage  (Read 365 times)
0 Members and 1 Guest are viewing this topic.
kunci
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: January 12, 2006, 11:20:00 PM »

The Documentation states in 9.1 that "Arguments cannot be passed to CGI scripts running in an SSI environment on most servers".  However, the 'exec cgi' SSI command will pass into the script any variable passed to the including page.  

Consider a page 'page.shtml', that in turn has the following line:

<!--#exec cgi="/cgi-bin/calendar.pl"-->

If that page is linked to as in:

<a href="page.shtml?template=blah.html">

then the value of 'template' will be passed to calendar.pl.  This will work for any number of variables; inside of the script, use $SCRIPT_NAME and $QUERY_STRING, rather than $CGI_URL_QUERYSTRING.  

Additionally, on Apache, static values can be passed into SSI-based templates using something like this:

<!--#include virtual="/cgi-bin/calendar.pl?template=blah.txt"-->

It may be worthwhile to update the documentation, which describes the SSI usage in a rather pessimistic way, while in fact it's as good as "straight up"...

Logged
Pages: [1]   Go Up
Print
Jump to: