Web programmingUnits WEB1P and WEB2P |
The Common Gateway Interface (commonly known as CGI) is a standard for linking web servers with executable programs (or scripts). It specifies how the server passes information into the program, and how the program passes information back out to the server. The output of the program must be a document (and associated headers) that the web server can pass (via HTTP) to the user's browser.
CGI programs can be written in almost any programming language that runs on the web server computer. Perl is perhaps the most common one.
Figure 1 shows the architecture of a CGI application. The client browser communicates with the web server via the HTTP protocol. The server communicates with the CGI program via the CGI protocol.
In brief, CGI works as follows:
For more details, see
Last updated by Prof Jim Briggs of the School of Computing at the University of Portsmouth |
||
The web programming units include some material that was formerly part of the WPRMP, WECPP, WPSSM and WEMAM units. |