Solved

Passing Parameters in SSI

Posted on 1997-01-16
1
1,307 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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
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…

771 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

10 Experts available now in Live!

Get 1:1 Help Now