What exactly is a CGI thing?

Source: Internet
Author: User
I found some information on the CGI, still can not fully understand.
Who can combine the history of web development, say that CGI and Web server (Apache,iis) also have PHP relationship.


Reply to discussion (solution)

Public Gateway Interface CGI (Common gatewayinterface) is one of the most important technologies in WWW technology, which has irreplaceable important position. CGI is an interface standard between an external application (CGI program) and a Web server, and is a discipline for passing information between CGI programs and Web servers. The CGI specification allows the Web server to execute external programs and send their output to a Web browser, CGI turning a simple set of static hypermedia documents from the Web into a complete new interactive media.

Moderator can give a picture of the image point,
Or a metaphor or something.

Cig is a protocol that describes the exchange of information between Web servers (Nginx, Apache, etc.) and application gateways (PHP, Python, and so on).

Typically, when a Web server receives a file request from a browser, it sends the file requested by the browser to the browser and tells

The type of file that the browser sends. However, if the browser is not requesting a file, that is, the URL is pointing to a program (or script), then

The Web server will execute the program first, and then send the output generated by the program to the browser like a file. Any CGI-compliant,

A program executed by a Web server that can receive information from a Web server or send information to a Web server is called a CGI program. The CGI program and the Web

Server-Independent, executable on any Web server (can be performed on any particular Web server).


The picture is simple, but it's a good illustration.

CGI is just a specification, not a real thing (or program) called CGI.

In short, CGI specifies what the Web server will enter into the back (CGI) application and can handle the output of the application.

is a set of norms.

You want to open a restaurant, but open a restaurant need a series of formalities, photos, purchase channels, rent backyards, recruit staff This can also be regarded as a set of norms, follow this set of norms, you can open up.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.