Solved

Passing Parameters in SSI

Posted on 1997-01-16
1
1,313 Views
Last Modified: 2013-12-25
I am writing a script using Perl and wish to pass the script a parameter. I also want to use the script as a server side include, for instance: <--!#exec cgi="/cgi-bin/test.cgi?datafile"-->

Is this possible to do and if so what is the code I should use in the script to assign the parameter to a variable.
0
Comment
Question by:hamster101496
1 Comment
 
LVL 1

Accepted Solution

by:
wormzer earned 50 total points
ID: 1827615
If you invoke your script like you have there, as a cgi= in the #exec command, you can pass whatever arguments you like after the ?.  You need to do so in the conventional way, although, pairing up values with named variables like so:

cgi="/cgi-bin/test.cgi?datafile=file.name&paramter2=somethingelse"

This will pass in two variables, "datafile" and "paramter2" with the same method as a GET method form submission (where the CGI arguments are appended to the URL).  If this needs more clarification, please let me know with a return comment.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How can I modify this Excel worksheet with a script? 15 82
Disk Ram Peak 1 40
ROBOFTP UNZIP 1 40
Bartender label printing - switch on and off graphics 3 36
The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question