考虑让我的 web server 增加对 PHP 的支持,这就要用到 php 解析器来将客户端请求的 php 文件解析为静态资源,再由我的 web server 将其返回到客户端,php-fpm 就可以来帮我们完成这个工作。可是我的 web server 如何与 php-fpm 通信呢? 接下来就是本文的主角:FastCGI 。
FastCGI 实现与测试代码:https://github.com/Tanswer/FastCGI
Web Server 项目地址:https://github.com/Tanswer/Xserver
Description
C language through FastCGI protocol, through php-fpm, php file parsed into html files.
How to use
Preparation:
please make sure you have installed php-fpm.
Testing environment:CentOS 7