PHP Manual by the PHP Documentation Group php.net
php_sapi_name
(PHP 4 >= 4.0.1, PHP 5)
php_sapi_name --
Returns the type of interface between web server and PHP
Description
string
php_sapi_name ( void )
php_sapi_name() returns a lowercase string
which describes the type of interface between web server and PHP
(Server API, SAPI). In CGI PHP, this string is "cgi", in mod_php
for Apache, this string is "apache" and so on.
Example 1. php_sapi_name() example
<?php $sapi_type = php_sapi_name(); if (substr($sapi_type, 0, 3) == 'cgi') { echo "You are using CGI PHP\n"; } else { echo "You are not using CGI PHP\n"; } ?>
|
|
© 2001 - 2009 CYGAD.NET | All rights reserved. |
Terms of Service |
About | Time data: GMT +1! | Portal Release X2.6.1 Beta | RunTime: 0.6018
Optimized for

Internet Explorer 6.0+,

Firefox 1.5+!