Solved

Passing Parameters in SSI

Posted on 1997-01-16
1
1,319 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
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…

739 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