PHP

function_exists — Return TRUE if the given function has been defined
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 23:41
함수 유무