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';
}
php动态调用方法_sux的更多相关文章
- Struts2 动态调用方法
struts2动态调用方法有两种方式 方式一:用通配符进行调用: Action方法: package com.bjyinfu.struts.actions; public class CatchDyn ...
- struts2 type="redirectAction"重定向 与动态调用方法
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE struts PUBLIC "-/ ...
- Xcode中Objc动态调用方法同时避免警告的几个办法
我们在Xcode中使用objc写代码的时候往往会碰到动态调用方法的时候. 如果是静态调用这很常见,不会有任何问题: [self performSelector:@selector(method)]; ...
- C#使用表达式树动态调用方法并实现99乘法表
我们在使用C#编程的时候,经常使用反射来动态调用方法,但有时候需要动态的生成方法,下面介绍使用表达式树的方式来自动生成方法,并调用. 首先需要说明什么是表达式,熟悉Linq的程序猿都用过类似于下面的代 ...
- Guava动态调用方法
前言 大家在Coding的时候,经常会遇到这样一个情况,根据不同的条件去执行对应的代码.我们通常的处理方式是利用if-else判断,或者直接switch-case,特别是jdk1.6之后,swith开 ...
- C# 知识点笔记:IEnumerable<>的使用,利用反射动态调用方法
IEnumerable<T>的使用 创建一个IEnumerable对象 List<string> fruits = new List<string> { " ...
- spring动态调用方法
有的时候为了程序的灵活性,需要根据参数动态的调用方法.代码框架大致spring为主,下面是具体代码: 接口: 实现类(实现类中有一个从spring容器中取的对象) 这是最初我直接用反射去调用的代码: ...
- 利用java反射动态调用方法,生成grid数据
项目中需要java后台查询并组装前台grid的数据,数据行数不定,数据行定义不定,开始用了最原始的方法,写了几百行,就是前台需要什么字段后台拼接什么字段,java代码冗余量非常大,并且不够灵活,一旦前 ...
- php中怎么使用call_user_func动态调用方法
php中可使用call_user_func进行方法的动态调用,可以动态调用普通函数.类方法以及带参数的类方法1.定义一个普通函数getCurrentDate,用于获取今天日期.call_user_fu ...
随机推荐
- 阿里云主机安装Memcached
http://www.zyuns.com/?page_id=354 前言最近发现阿里云主机在使用中,并发访问量稍大,页面加载速度就很慢.于是学习了一些服务器优化的文章,决定安装Memcached,优化 ...
- Java [leetcode 38]Count and Say
题目描述: The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, ...
- Android学习系列(28)--App集成支付宝[已过期]
手机的在线支付,被认为是2012年最看好的功能,我个人认为这也是移动互联网较传统互联网将会大放光彩的一个功能.人人有手机,人人携带手机,花钱买东西,不再需要取钱付现,不再需要回家上网银,想买什么,扫描 ...
- 理解dojo.require机制
转自:http://blog.csdn.net/dojotoolkit/article/details/5935844 Dojo 提供了一个非常强大的javascript控件库. 在使用dojo之前, ...
- MD5加密帮助类
using System; using System.Collections.Generic; using System.Text; namespace AIMSCommon { /// <su ...
- MFC 状态栏相关使用(CStatusBar & CStatusBarCtrl)
原文:MFC 状态栏相关使用(CStatusBar & CStatusBarCtrl),沙漠紫风铃 本文介绍了MFC中和状态栏相关的用法: 在MFC的的单文档应用中,在建好应用程序之后,CMa ...
- [转] windows7 IIS管理器 在计算机“.”上没有找到WAS服务
原文地址:windows7 IIS管理器 在计算机"."上没有找到WAS服务作者:云中的风 OS:windows7旗舰版 产生问题原因:运行金蝶K3-HR时客户端提示中间层服务器不 ...
- [Bhatia.Matrix Analysis.Solutions to Exercises and Problems]ExI.5.9
(Schur's Theorem) If $A$ is positive, then $$\bex \per(A)\geq \det A. \eex$$ Solution. By Exercise I ...
- create Context Menu in Windows Forms application using C# z
In this article let us see how to create Context Menu in Windows Forms application using C# Introduc ...
- WebDriver 运行模式下使用rc 代码
selenium2 对之前的rc 代码提供了兼容性接口,如果你之前的code 都是用rc 写,而现在又想摆脱要每次启动server,你只需要 略做修改即可.代码如下: public class Tes ...