Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Passing Parameters in SSI

Posted on 1997-01-16
1
Medium Priority
?
1,332 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 100 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

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…
It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to dynamically set the form action using jQuery.

670 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