Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: php_sapi_name - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net

search for in the

php_uname" width="11" height="7"/> <php_logo_guid
Last updated: Wed, 01 Nov 2006
view this page in

php_sapi_name

(PHP 4 >= 4.0.1, PHP 5)

php_sapi_name --  Web サーバと PHP の間のインターフェイスの型を返す

説明

string php_sapi_name ( void )

php_sapi_name() は、Web サーバと PHP (サーバ API、SAPI) の間のインターフェイスの型を小文字の文字列で返します。 CGI 版の PHP ではこの文字列は「cgi」となり、Apache の mod_php 版では この文字列は「apache」となるといったようになります。

例 1. php_sapi_name() の例

<?php
$sapi_type
= php_sapi_name();
if (
substr($sapi_type, 0, 3) == 'cgi') {
   echo
"CGI 版の PHP を使用しています\n";
} else {
   echo
"CGI 版の PHP を使用していません\n";
}

PHP_SAPI も参照ください。



add a note add a note User Contributed Notes
php_sapi_name
cheezy at lumumba dot luc dot ac dot be
14-Jul-2003 01:11
The returned strings can be found in the source code (of course!), this is the list I found (using [ http://lxr.php.net/ident?i=sapi_module_struct ]):

- aolserver
- activescript
- apache
- cgi-fcgi
- cgi
- isapi
- nsapi
- phttpd
- roxen
- java_servlet
- thttpd
- pi3web
- apache2filter
- caudium
- apache2handler
- tux
- webjames
- cli
- embed
- milter

php_uname" width="11" height="7"/> <php_logo_guid
Last updated: Wed, 01 Nov 2006
 
 
show source | credits | sitemap | contact | advertising | mirror sites