php_sapi_name() 是用来检测PHP运行环境的函数. 该函数返回一个描述PHP与WEB服务器接口的小写字符串. 例如:aolserver, apache,apache2filter, apache2handler, caudium, cgi(until PHP 5.3),cgi-fcgi, cli, continuity, embed, isapi, litespeed, milter, nsapi, phttpd, pi3web, roxen,thttpd, tux, webjam…