I heard that nginx does not need multiple processes. Isn't multiple requests using the same process not interfering? Does php code need to be rewritten? I heard that nginx does not need multiple processes. Isn't multiple requests using the same process not interfering?
Does php code need to be rewritten?
Reply content:
I heard that nginx does not need multiple processes. Isn't multiple requests using the same process not interfering?
Does php code need to be rewritten?
No need at all. It has nothing to do with php. php is a scripting language. You have a virtual machine to process these things. You don't need to worry about the platform on which to run them.
Some variables, such as _ SERVER [PHP_SELF], are related to apache or nginx.
With PHP, you only need to pay attention to the PHP interpreter. No matter which web server is used, you need to call the interpreter to execute the script.
Not only will it not interfere with... On the contrary, this single-process (thread) model will provide better performance in high concurrency... for example, nodejs...
Because of the high concurrency... the multi-process (thread) model will waste most of the CPU's computing power on its process (thread) switching...
The $ _ SERVER variable may have an impact, and then the rewrite rule needs to be modified.