1. CGI
Allows the web server to communicate with the application through a specific protocol. In layman's terms, CGI is like a bridge that connects the web page and the execution program in the WEB server, passes the instructions received by the HTML to the server execution program, and then executes the server The program returns to the HTML page. Cross-platform CGI has excellent performance and can be implemented in almost any operating system.
2. FastCGI
Fast-cgi is an upgraded version of cgi mode. It is like a resident cgi. As long as it is opened, it does not take time to fork every time and can always process requests without ending the process.
3. CLI
It is the interface for running the php command line, which is different from the PHP environment (PHP-CGI, ISAPI, etc.) running on the web server. In other words, PHP can not only write front-end pages, but also write background programs.
4. Web module mode
When apache+php is running, the module mode is used by default. It uses php as a module of apache and starts it when apache starts. When a user request is received, it is processed directly by calling the mod_php module.
5. ISAPI
It is a set of API interfaces for Internet services provided by Microsoft. An ISAPI DLL can reside in memory after being activated by a user request and wait for another user request. Multiple user request processing functions can also be set in one DLL.
The above is a detailed explanation of the common operating modes of PHP. I hope it will be helpful to everyone.