Let's say you have a server whose docroot is at ~myname/httpd. This server is visible at the URL http://www.mysite.com.
Now any file you put into ~myname/httpd, say ~myname/httpd/contact_me.html, is available through the Web server -- in this case as http://www.mysite.com/contact_me.html.
That file doesn't have to be an HTML document; it could also be a script. Save a simple CGI script in the docroot as test.pl and you can now run it by visiting http://www.mysite.com/test.pl. (Maybe; see footnote below.)
You can append even more information to the URL, like http://www.mysite.com/test.pl/12345, and this will still run test.pl with 12345 in $ENV{PATH_INFO}.
Is any of this really necessary for your particular application? I don't really have enough information to say. But it is an alternative to the question-mark way of passing CGI params.
Footnote: Depending on your server configuration, you might not actually be able to execute arbitrarily-named programs from arbitrary directories. So you might actually have to do something like http://www.mysite.com/cgi-bin/myprog.cgi/more/params/go/here.
In reply to Re: Re: Re: what to use create, .html or .cgi
by seattlejohn
in thread what to use create, .html or .cgi
by andrew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |