PHP

    function_exists — Return TRUE if the given function has been defined
    • 조회수 4,511
    • 작성일 2009-08-30
    •  
    bool function_exists ( string $function_name )

    <?php
    if (function_exists('imap_open'
    )) {
        echo 
    "IMAP functions are available.<br />\n"
    ;
    } else {
        echo 
    "IMAP functions are not available.<br />\n"
    ;
    }
    ?>

    if(function_exists("mb_detect_encoding")) {
      echo "33333333";
      echo "<br/>";
    }

    • Comment 2010-05-01
    함수 유무