PHP: php_sapi_name - Manual in Deutsh
PHP: php_sapi_name - Manual in French
PHP: php_sapi_name - Manual in Polish

You Are At PHP: php_sapi_name - Manual Area


recent searches:
include functions , variable functions , post functions...




If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.

PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.

PHP Manual
PrevNext

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_type, 0, 3) == 'cgi') {
    echo
"You are using CGI PHP\n";
} else {
    echo
"You are not using CGI PHP\n";
}
?>

See Also

PHP_SAPI

Karma pedigree - Najlepsza dla twojego zwierzaka
fotograf ślubny lublin
raty
forma spółki
Wykaz informacyjny dodaj stronę

Another Useful functions:


streams.struct-php-stream-wrapper | streams.struct-php-stream-wrapper-ops | streams.struct-php-stream-statbuf | streams.struct-php-stream-ops | streams.struct-php-stream-filter | streams.struct-php-stream-filter-ops | streams.struct-php-stream-dirent | streams.php-stream-write | streams.php-stream-tell | streams.php-stream-stat | streams.php-stream-stat-path | streams.php-stream-sock-open-unix | streams.php-stream-sock-open-host | streams.php-stream-sock-open-from-socket | streams.php-stream-seek | streams.php-stream-rewinddir | streams.php-stream-readdir | streams.php-stream-read | streams.php-stream-passthru | streams.php-stream-opendir | streams.php-stream-open-wrapper | streams.php-stream-open-wrapper-ex | streams.php-stream-open-wrapper-as-file | streams.php-stream-make-seekable | streams.php-stream-is | streams.php-stream-is-persistent | streams.php-stream-gets | streams.php-stream-getc | streams.php-stream-fopen-tmpfile | streams.php-stream-fopen-temporary-file | streams.php-stream-fopen-from-file | streams.php-stream-flush | streams.php-stream-filter-unregister-factory | streams.php-stream-filter-register-factory | streams.php-stream-eof | streams.php-stream-copy-to-stream | streams.php-stream-copy-to-mem | streams.php-stream-closedir | streams.php-stream-close | streams.php-stream-cast | streams.php-stream-can-cast | function.php-strip-whitespace | function.php-sapi-name |


PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.