php_sapi_name
(PHP 4 >= 4.0.1, PHP 5)
php_sapi_name --
Retorna o tipo de interface entre o servidor web e o PHP
Descrição
string
php_sapi_name ( void )
php_sapi_name() retorna uma string minúscula que descreve o tipo de
interface entre o servidor web e o PHP (Server API, SAPI). Em CGI PHP, esta string é
"cgi", em mod_php para o Apache, esta string é "apache" e assim por diante.
Exemplo 1. Exemplo 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"; } ?>
|
|