PHP的SAPI

摘自:https://en.wikipedia.org/wiki/Server_Application_Programming_Interface。
php

In computingServer Application Programming Interface (SAPI) is the direct module interface to web servers such as the Apache HTTP ServerMicrosoft IIS, and Oracle iPlanet Web Server.Microsoft also uses the term Internet Server Application Programming Interface (ISAPI), and the defunct Netscape web server used the term Netscape Server Application Programming Interface(NSAPI) for the same purpose.[1] In other words, SAPI is actually an application programming interface (API) provided by the web server to help other developers in extending the web server capabilities.html

As an example, PHP has a direct module interface called SAPI for different web servers;[2] in case of PHP 5 and Apache 2.0 on Windows, it is provided in form of a DLL file called php5apache2.dll,[3] which is a module that, among other functions, provides an interface between PHP and the web server, implemented in a form that the server understands. This form is what is known as a SAPI.web

There are different kinds of SAPIs for various web server extensions. For example, another two SAPIs for the PHP language are Common Gateway Interface (CGI) and command-line interface(CLI).[2][4]apache


上面摘自Laruence 的空間:http://www.laruence.com/2008/08/12/180.html,初步感受名字他應該是寫錯了。編程

參考http://www.php-internals.com/book/?p=chapt02/02-02-00-overview,感受寫的仍是不錯的。app

關鍵參看下圖:ide


http://www.csdn.net/article/2014-09-26/2821885-exploring-of-the-php-2,這個講的也很好。spa

應該翻譯爲「服務端應用編程接口」。
.net

總結一下,其實就是PHP做爲一個總體而言,與外部的接口,主要是PHP和Web Server的接口,PHP和Shell的接口。翻譯

與Web Server的接口就是:CGI、Fast-CGI等等;與Shell的接口就是CLI。

相關文章
相關標籤/搜索