It is currently Mon, 25 Sep 2023 11:32:43 GMT



 
Author Message
 CGI commands with command line args?

Is it possible to call a CGI program with command line arguments?
I can't get this to work (Apache 1.2 on Linux).

I also tried writing a script to call the program with the arguments
but then I lose the CGI information.

Any help is appreciated.

--
Dennis Brown                                            brownde @ cs.unc.edu
Visit the Classic Home Games Museum at http://www.**-**.com/ ~brownde/museum



 Sat, 03 Jun 2000 03:00:00 GMT   
 CGI commands with command line args?

Read the CGI "spec", as it is.

http://hoohoo.ncsa.uiuc.edu/cgi/interface.html



 Sun, 04 Jun 2000 03:00:00 GMT   
 CGI commands with command line args?

http://www.cs.unc.edu/~brownde/museum

Yes... call the cgi and follow it with a '?' then arguments separated by
'+' signs.  For example,
http://www.my-ged.com/db/test.pl?parm1+parm2+parm3
passes the three arguments to test.pl.  At least it does on my
apache 1.2.4 on linux.  I just tried it out using the following perl
script:

#!/usr/bin/perl
print "Content-type: text/html\n\n<html>
<head><title>Testing parameters</title>
</head><h1>Testing</h2><body>";
foreach $parm (@ARGV) { print "$parm<br>" }
print "</body></html>";

Dave Wilks



 Sun, 04 Jun 2000 03:00:00 GMT   
 
   [ 3 post ] 

Similar Threads

1. how to set argv command line args for ps

2. How to find out all the input args of a long command line

3. Script/Command line args for FTP needed!!

4. How to hide command line args under Solaris

5. Command-line args in C

6. Command line args

7. command line args and 'if'

8. space in command line args

9. csh script command line args

10. command line args in csh scripts (-f and -d)


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software