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: Tue, 27 Nov 2007

view this page in

php_sapi_name

(PHP 4 >= 4.0.1, PHP 5)

php_sapi_name — Devuelve el tipo de interfaz entre el servidor web y PHP

Descripción

string php_sapi_name ( void )

Devuelve una cadena en minúsculas que describe el tipo de interfaz entre el servidor web y PHP (API de Servidor, SAPI). En PHP CGI, esta cadena es "cgi", en mod_php para Apache, esta cadena es "apache" y así sucesivamente.

Valores retornados

Devuelve el tipo de interfaz, como una cadena en minúsculas.

Ejemplos

Example#1 Ejemplo de php_sapi_name()

<?php
$tipo_sapi 
php_sapi_name();
if (
substr($tipo_sapi03) == 'cgi') {
    echo 
"Está usando PHP CGI\n";
} else {
    echo 
"No está usando PHP CGI\n";
}
?>

Ver tambié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 07: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: Tue, 27 Nov 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites