What is cgi? I found some cgi information, but I still cannot fully understand it.
Who can combine the web development history to talk about the relationship between cgi and web servers (APACHE, iis) and php.
Reply to discussion (solution)
Common GatewayInterface (CGI) is one of the most important technologies in WWW technology and plays an irreplaceable role. CGI is the interface standard between external applications (CGI programs) and Web servers. it is the procedure for transmitting information between CGI programs and Web servers. CGI specifications allow the Web server to execute external programs and send their output to the Web browser. CGI converts a simple set of static hypermedia documents on the Web into a complete new interactive media.
Can the moderator give an image point,
Or a metaphor ..
Cig is a protocol that describes information exchange between web servers (such as nginx and apache) and application gateway (such as php and python.
Generally, when the web server receives a file request from the browser, it sends the file requested by the browser to the browser and reports
File type sent by the browser. However, if the browser requests not a file, that is, the URL points to a program (or script ),
The Web server will first execute this program, and then send the output result of the program to the browser like a file. Any,
Programs executed by the Web server that can receive or send information from the Web server to the Web server are called CGI programs. CGI program and Web
The server is independent and can be executed on any Web server (any specific web server can be executed ).
This picture is very simple, but it can explain the problem
Cgi is just a specification, and there is no actual thing (or program) called cgi.
To put it simply, cgi specifies what the web server will input to the (cgi-supported) application and what output the application can process.
Is a set of specifications.
You need to open a restaurant, but opening a restaurant requires a series of procedures, such as photo taking, purchase channels, house rental, and employee recruitment. This can also be regarded as a set of standards, you can start it.