CGI - Common Gateway Interface Script

What is a CGI file

The CGI file extension is assigned to executable files that contain script written in a certain programming language. CGI files typically contain code written in Perl or C. These executable CGI scripts are commonly used to run basic scripts on the internet. This includes changing or rotating advertisements on a web site or sending e-mails through a so-called formmail, a web form that is used for making contact.

CGI files are saved on a web server. Editing of the file is only possible if it hasn't been compiled beforehand. CGI scripts are the standard protocol that allows external applications and programs to interact with a web server. Thus, requests can be passes from a user's web browser to the according application or software. The web server, in return, sends the requested output back to the web browser. The code inside the CGI file is stored as plain text.

Here's a small, but not exhaustive list of programs that can open CGI documents:

  • Bare Bones BBEdit (Mac)
  • gVim (Windows)
  • MacroMates TextMate (Mac)
  • Microsoft Notepad (Windows)
  • Richardson EditRocket (Windows, Linux & Mac)
  • Other Text Editors
About
Extension CGI
MIME type wwwserver/shellcgi
Useful links
AI Art Generator Unleash your creativity with our AI Creator Studio, transforming your text into stunning art
Try Now