Invoking a CGI Program

reference: http://devedge-temp.mozilla.org/library/manuals/1998/htmlguide/tags17.html

Invoking a CGI Program
You can use URLs to invoke CGI programs. A CGI program runs on a a server, processes arguments sent by the URL, and returns data to the browser. It is beyond the scope of this reference to provide details of CGI programming, but many fine books are available on the subject, and also lots of information is available on the web.

To specify a URL that invokes a CGI program, specify the location of the CGI program, followed by a query string which contains the arguments for the program. A query string consists of a question mark, followed by the name/value pairs to be submitted to the program. Each name/value pair is separated by an &. Use the URL-encoded value %20 to indicate white spaces and %0A to indicate new lines.
The following example invokes the program "compute.cgi" that takes three arguments. The value of the argument val1 is 25, val2 is 39, and text is "how now brown cow".

http://www.somecompany.com/cgi-bin/compute.cgi?val1=25&val2=39&text=how%20now%20brown%20%cow
Note that in the above example there should be no line breaks; the line break shown is for readability only.

More good references about invoking CGI:
http://www.cs.cf.ac.uk/Dave/PERL/node193.html

你可能感兴趣的:(html,Web,cgi,perl)