zoukankan      html  css  js  c++  java
  • php动态调用方法_sux

    <form  action="">
     <input type="hidden" name="mod" id="mod" value="location"/><br/>
     <input type="hidden" name="do" id="do" value="test10"/>
     <input type="hidden" name="a"  value="h_user"/>
     <input type="text" name="wuid" value="si" />
     <input type="submit" value="查询hbase用户"/>
    </form>


    <form  action="">
     <input type="hidden" name="mod" id="mod" value="location"/><br/>
     <input type="hidden" name="do" id="do" value="test10"/>
     <input type="hidden" name="a"  value="h_solomo"/>
     <input type="text" name="wuid" value="" />
     <input type="submit" value="查询solomo用户"/>
    </form>

    <form  action="">
     <input type="hidden" name="mod" id="mod" value="location"/><br/>
     <input type="hidden" name="do" id="do" value="test10"/>
     <input type="hidden" name="a"  value="s_user"/>
     <input type="text" name="name" value="" />
     <input type="submit" value="查询solr用户"/>
    </form>

    <pre>
    <?php
    $a = '';
    if (!empty($_GET ['a'])) {
     $a = trim($_GET ['a']);
     $a();
    }

    die;

    by zp:

    <?php
     error_reporting (E_ALL);
     ini_set ('display_errors', 'on');
    ?>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <div>
     <form>
      <input type="text" name="regexName">
      <input type="text" name="funcName" value="test"/>
      <input type="submit" value="执行方法"/>
     </form>
    </div>
    <?php
    if(!empty($_GET['funcName'])){
     $funcName = trim($_GET['funcName']);
     $funcName();
    }
    function activeMethod($methodName){
     $methodName();
    }
    function test(){
     echo 'test';
    }

  • 相关阅读:
    迭代器模式 -- 大话设计模式
    组合模式 -- 大话设计模式
    备忘录模式 -- 大话设计模式
    totalcmd简单教程--help详解
    Listary Primary
    Cygwin Primary
    Google calendar
    极点郑码标点符号
    Totalcmd 简单教程
    Foobar 简单教程
  • 原文地址:https://www.cnblogs.com/andydao/p/3210137.html
Copyright © 2011-2022 走看看