Solved

CGI '?' '&' ...

Posted on 1997-03-06
1
185 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

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…
This article will show, step by step, how to integrate R code into a R Sweave document
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

746 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

18 Experts available now in Live!

Get 1:1 Help Now