码迷,mamicode.com
首页 > 其他好文 > 详细

执行方法,安全模式方法(备用)

时间:2015-05-22 14:52:32      阅读:116      评论:0      收藏:0      [点我收藏+]

标签:

www.XXX.com/mod=titlebytid

define(‘API_SALT_KEY‘, ‘lizuofeng‘);

$mod = $_GET[‘mod‘];//所走的方法
$pre_string = ‘edit_‘;
$function = $pre_string.$mod;
$salt = md5($_GET[‘titlebytid‘].API_SALT_KEY);


//check salt 
if($_GET[‘salt‘] != $salt){
	exit(json_encode(array(‘error‘ => -1)));
}

if(function_exists($function)) call_user_func($function);

function edit_titlebytid(){
	$tid = $_GET[‘tid‘];//判断所需的字段值
	$fid = $_GET[‘fid‘];//判断所需的字段值
}

  

执行方法,安全模式方法(备用)

标签:

原文地址:http://www.cnblogs.com/lizuofeng/p/4522268.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!