php internal(php体系结构跟原理)
Jun 13, 2016 pm 12:23 PM
php internal(php体系结构和原理)
一.前言-后端如何处理一条index.php动态请求。
很多公司用lnmp环境作为基础软件环境,用php能做快速开发。下面简单描述下,后端是如何处理一个从浏览器发起的 http://www.abcdxxx.com/index.php的请求的。
browser->nginx 通过http协议,nginx 接收浏览器发的动态请求。
browser->nginx->phpcgi,nginx把接收到的请求,通过cgi协议,发送给php-fpm进程做处理。
php-fpm内部处理过程,先把php程序,编译成opcode 字节码,然后把opcode字节码 放到zend 引擎(虚拟机) 上运行,和java类似。
zend 引擎(虚拟机)直接与操作系统,发起系统调用等处理请求。
如果涉及到需要连mysql,那就发起请求,通过mysql client协议,将请求发给mysql,去操作mysql的数据。
二.参考资料
https://github.com/reeze/tipi/blob/master/web/releases/TIPI_2014-04-29_V0.8.3.chm?raw=true
http://yanbin.org/download/php-internals.pdf
http://derickrethans.nl/talks/internals.pdf
http://nginx.org/en/docs/http/request_processing.html
http://cdn.nginx.com/wp-content/uploads/2015/04/150427_NGINX-subway_RGB.png
版权声明:本文为博主原创文章,未经博主允许不得转载。

Article chaud

Outils chauds Tags

Article chaud

Tags d'article chaud

Bloc-notes++7.3.1
Éditeur de code facile à utiliser et gratuit

SublimeText3 version chinoise
Version chinoise, très simple à utiliser

Envoyer Studio 13.0.1
Puissant environnement de développement intégré PHP

Dreamweaver CS6
Outils de développement Web visuel

SublimeText3 version Mac
Logiciel d'édition de code au niveau de Dieu (SublimeText3)

Sujets chauds

Guide d'installation et de mise à niveau de PHP 8.4 pour Ubuntu et Debian

Comment corriger les erreurs mysql_native_password non chargé sur MySQL 8.4
