There are several ways to generate web pages using php in web server
Editor to share with you there are several ways to use php to generate web pages in web server, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
There are three ways for web server to generate a web page using php:
One: use PHP as CGI Wrapper. In this way, each request to the web server causes a php parser process to be created, and when the php page execution ends, the php parser process terminates.
Second: in multi-process web server, php is regarded as a module of web server. This is by far the most popular practice, but it is currently the only way that apahce uses. A multi-process web server usually has a total parent process that coordinates a stack of child processes to work. When the page request arrives at web server, the parent process passes the request to an idle child process to complete. Two requests for the same client are not necessarily processed by child processes of the same web server.
Third: in multithreaded web server, php is used as a plug-in. For example, IIS uses this approach. It works the same way as multi-processes, except that it uses threads instead of processes.
The above is all the contents of this article entitled "there are several ways to generate web pages using php in web server". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!