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: Fri, 11 Apr 2008

view this page in

php_sapi_name

(PHP 4 >= 4.0.1, PHP 5)

php_sapi_name — Gibt das genutzte Interface zwischen PHP und dem Webserver zurück

Beschreibung

string php_sapi_name ( void )

Gibt einen String in Kleinbuchstaben zurück der den Typ der Schnittstelle ziwschen PHP und dem Webserver (Server API, SAPI) beschreibt. Wird das CGI Binary eingesetzt so ist das Ergebnis z.b. "cgi", das Apache-Modul mod_php gibt "apache" zurück usw.

Rückgabewerte

Gibt den INterfacetyp als kleingeschriebenen String zurück.

Beispiele

Beispiel #1 php_sapi_name() Beispiel

<?php
$sapi_type 
php_sapi_name();
if (
substr($sapi_type03) == 'cgi') {
    echo 
"Sie benutzen CGI PHP\n";
} else {
    echo 
"Sie benutzen nicht CGI PHP\n";
}
?>

Siehe auch



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: Fri, 11 Apr 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites