Solved

CGI '?' '&' ...

Posted on 1997-03-06
1
188 Views
Last Modified: 2013-12-25
Could someone / some people give working examples using QUERY_STRING method where the URL is of the form http://<somewhere>/<filename>?<something>.  Please don't refer me to books.
0
Comment
Question by:dtww
1 Comment
 

Accepted Solution

by:
henryj earned 50 total points
ID: 1827638
Not sure why you want this - maybe your server is doing something odd and you want to check - but save this as test.pl (be sure
to convert crlf's to lf's if you're on UNIX).

#!/usr/bin/perl


$args=$ENV{'QUERY_STRING'};

print "content-type: text/html\n\n";
print "<html><body>\n";
print "Argument was $args\n";
print "</body></html>\n";


When you call /cgi-bin/test.pl?argument1 it should print out
argument1. Is this what you were after?

henry

0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
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 lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
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…

829 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