PHP Dynamic Call method instance code. PHP Dynamic Call method example code :? Phprequire_onceshowErrMsg.php; $ _ action (isset ($ _ REQUEST [action])? $ _ REQUEST [action] :); if ($ _ action! Null $ _ action !) {If (function_e PHP Dynamic Call method example code:
Require_once showErrMsg. php;
$ _ Action = (isset ($ _ REQUEST [action])? $ _ REQUEST [action]: "");
If ($ _ action! = Null & $ _ action! = ){
If (function_exists ($ _ action )){
Eval ("$ _ action ();");
} Else {
Die (showErrMsg ("
Method does not exist in the current php file [
". $ _ Action ."()]. "));
}
}
?>
Function showErrMsg ($ strMsg ){
Return "". $ strMsg ."";
}
?>
The http://www.bkjia.com/PHPjc/486103.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/486103.htmlTechArticlePHP Dynamic Call method instance code is as follows :? Php require_once showErrMsg. php; $ _ action = (isset ($ _ REQUEST [action])? $ _ REQUEST [action]: ""); if ($ _ action! = Null $ _ action! =) {If (function_e...