php_sapi_name

(PHP 4 )

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 1. 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";