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

search for in the

php_uname> <php_logo_guid
Last updated: Sun, 25 Nov 2007

view this page in

php_sapi_name

(PHP 4 >= 4.0.1, PHP 5)

php_sapi_name — 웹 서버와 PHP 간의 접근 형태를 반환합니다.

설명

string php_sapi_name ( void )

php_sapi_name()은 웹 서버와 PHP(서버 API, SAPI) 사이의 접근 형태를 설명하는 소문자 문자열을 반환합니다. CGI PHP에서, 문자열은 "cgi"이고, 아파치의 mod_php에서, 문자열은 "apache"인 형태입니다.

Example#1 php_sapi_name() 예제

<?php
$sapi_type 
php_sapi_name();
if (
$sapi_type == "cgi") {
    echo 
"You are using CGI PHP\n";
} else {
    echo 
"You are not using CGI PHP\n";
}
?>



add a note add a note User Contributed Notes
php_sapi_name
cheezy at lumumba dot luc dot ac dot be
13-Jul-2003 09: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> <php_logo_guid
Last updated: Sun, 25 Nov 2007
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites