illustrate
1. It is an important Internet technology that allows a client to request data from a web browser to a program executing on a web server.
2. CGI describes a standard for transferring data between servers and request handlers.
How CGI mode works
When Nginx receives the browser/index.php request, it will first create a process that implements the CGI protocol, here is php-cgi (PHP parser). Next, php-cgi will parse the php.ini file, initialize the execution environment, process the request, return the processed result in the format specified by CGI, and exit the process. Finally, Nginx returns the results to the browser. The whole process is a Fork-And-Execute mode. When the number of user requests is very large, a large amount of system resources such as memory and CPU time will be occupied, resulting in low performance. Therefore, under a CGI server, there will be as many CGI child processes as there are connection requests. Repeated loading of child processes is the main reason for low CGI performance.
The above is an introduction to the CGI mode in php. I hope it will be helpful to everyone.