Script Arguments

Here is an explanation of how the script gets its query or form data.


Path Information

Scripts can be accessed either through their real name, or through their real name followed by extra path names. This capability is useful for writing filters, or things which need to send specific information to a general-purpose script. For an example of how this could be used, see the source for the imagemap script.

Example: Say I have a script called view-source. If I then add an HREF in a document to http://myserver/htbin/view-source/dir1/dir2/source.c, /htbin/view-source will be called with the extra information as defined below. In this case, the extra information is /dir1/dir2/source.c. NOTE: A script such as view-source is inherently dangerous, because it allows users to see your entire system. A proper script would translate the name into something else.


Search Information

Anything the user types in an <ISINDEX> box, or responds to in a form, will be sent as the search information.


The command line

You get the path and search information on the command line. Your argc will either be 1, 2, or 3.


Move on to decoding your arguments

Return to GET script overview

httpd@ncsa.uiuc.edu