Related Links : Search Engine Optimization | | Search Engine Marketing | Online Marketing | Freelance Programmer| SEO Thailand | SEO Expert | SEO services | PHP Programmer Thailand | SEO Tutorial | What is SEO |

  Home Our SEO Services SEO Expert Consultant Php Programmer Scripts| Email : sachin {at} jainsachin {dot} com

PHP | Returns the type of interface between web server and PHP | Manual | Tutorial | Help

SEO Services



Website Programming in PHP / MYSQL



Friends


    Returns the type of interface between web server and PHP

    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


    SEO Tutorial / Articles





    Php / Mysql Tutorial



    Articles



      Portfolio


      SEO by Jainsachin