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: Sat, 24 Mar 2007

view this page in

php_sapi_name

(PHP 4 >= 4.0.1, PHP 5)

php_sapi_name — Vrátit typ rozhraní mezi web serverem a PHP Returns the type of interface between web server and PHP

Popis

string php_sapi_name ( void )

php_sapi_name() vrátí řetězec popisující malými písmeny typ rozhraní mezi web serverem a PHP (Server API, SAPI). U CGI PHP je tento řetězec "cgi", u mod_php pro Apache je tento řetězec "apache" a tak dále.

Příklad 1567. php_sapi_name() Example

$sapi_type = php_sapi_name();
if ($sapi_type == "cgi")
  print "Používáte CGI PHP\n";
else
  print "Nepoužíváte 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: Sat, 24 Mar 2007
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites