3.2.1 What is CGI?

CGI stands for Common Gateway Interface and is all about creating CGI scripts to run on web servers. At the core, CGI scripts are simply computer programs which run on a web server and output HTML in a standard format back to the web browser. CGI scripts can be written in virtually any language including Python. CGI scripts can be used for creating dynamic web pages, responding to user actions, accessing databases, creating shopping carts, etc.

CGI programs have to have special permission to run on a server. This is to prevent people uploading files to a server and then running potentially harmful programs. Many ISP's do not let people run CGI scripts so you will have to find a server that does or use the webserver described in the previous section.

Rather than printing to the screen, CGI programs print to the web browser so that a standard print command produces text which will be seen on a web browser.

See About this document... for information on suggesting changes.