CGI-BIN test page for WebLight
The idea behind the CGI (Common Gateway Interface) is to create
the document at the same time as it is requested by the client. So the
Web client sends a URL that points to an executable, and the standard
output is send to the client as the web page to be displayed.
A CGI script may be written in C, GFAbasic, assembler or other
compiler languages, or can be a batch file if the environment variable
'SHELL=' is set and the file extention is *.BAT. You must put all your
CGI-Script in the sub-folder defined in setup menu.
This document use the program
env-cgi
for showing the environmentals variables available for programing. Note
scripts are very flexible, as a drawback you need to be careful to not
create security holes.
For more realistics samples , see also CGI Scripts samples
This is just a request for a CGI script with no extra path information
and no query.
/cgi-bin/tools/env-cgi
This is a request for a script with extra path information, and no
query.
/cgi-bin/tools/env-cgi/extra/path
This is a request for a script with no extra path information, and an
ISINDEX query.
/cgi-bin/tools/env-cgi?query
This is a request for a script with extra path information as well as
an ISINDEX query.
/cgi-bin/tools/env-cgi/extra/path?a+query
You'll need a browser which supports HTML forms for this example.
Clicking the submit button will send a form request with no extra
path information using the GET method.
You'll need a browser which supports HTML forms for this example.
Clicking the submit button will send an form request with no extra
path information using the POST method.
You'll need a browser which supports HTML forms for this example.
Clicking the submit button will send an form request with extra path
information of /foo using the POST method.
Samples provided by NCSA.