PHP Resources
Home
Books
Directories
Magazines
Non-English Sites
Online Communities
Tools
Tutorials and Articles
Web Hosting
PHP Functions
PHP News Groups *
PHP Reference
Smarty Reference
Pear Reference
PHP-GTK Reference

By submitting PHP Resources you own, or know of, you'll help us build the largest PHP Resource website on the net. Please double check that your resource doesn't already exist before you submit it!!. We thank you for helping make this a better website.









Resource Image Newest ResourcesPopular ResourcesTop Resources Resource Image
PHP Resources
PHP: php_sapi_name - Manual

search for in the

php_uname> <php_logo_guid
Last updated: Fri, 18 Jul 2008

view this page in

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 )

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.

Return Values

Returns the interface type, as a lowercase string.

Examples

Example #1 php_sapi_name() example

<?php
$sapi_type 
php_sapi_name();
if (
substr($sapi_type03) == 'cgi') {
    echo 
"You are using CGI PHP\n";
} else {
    echo 
"You are not using CGI PHP\n";
}
?>

See Also



add a note add a note User Contributed Notes
php_sapi_name
There are no user contributed notes for this page.

php_uname> <php_logo_guid
Last updated: Fri, 18 Jul 2008
 
 




Featured




Featured
PHP Code Examples
web site templates
Learn PHP playing Trivia
PHP & MySQL Forums
Web Development Index

List Your ResourceUpdate Your Resource

Copyright © 2006 - 2008 MickMel Inc