早期,一个web程序经过cgi方式提供数据处理,编写cgi程序能够用不一样的语言。php
这个过程是,咱们生成一个服务端可执行程序,处理 web server 传过来的请求,(设置header头)而后返回数据。html
PHP1是典型的cgi程序(https://github.com/farwish/php1),make编译获得的可执行程序能够被访问。git
下面是一个C编写的可运行程序演示其过程:github
https://github.com/farwish/cgi-bin-cweb
Link:http://www.cnblogs.com/farwish/p/6430479.htmlserver
@黑眼诗人 <www.farwish.com>htm