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 | conferences | my php.net

search for in the

php_uname" width="11" height="7"/> <php_logo_guid
Last updated: Fri, 18 Jul 2008

view this page in

php_sapi_name

(PHP 4 >= 4.0.1, PHP 5)

php_sapi_name — ウェブサーバと PHP の間のインターフェイスの型を返す

説明

string php_sapi_name ( void )

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

返り値

インターフェイスの型を小文字の文字列で返します。

例1 php_sapi_name() の例

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

参考



add a note add a note User Contributed Notes
php_sapi_name
There are no user contributed notes for this page.

php_uname" width="11" height="7"/> <php_logo_guid
Last updated: Fri, 18 Jul 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites