Solved

Passing Parameters in SSI

Posted on 1997-01-16
1
1,310 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to dynamically set the form action using jQuery.

920 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now