Commit 22588a2b authored by chenchuanwen's avatar chenchuanwen

invateTest

parent 309b5f19
......@@ -110,8 +110,10 @@ class IndexController extends \Our\Controller_Abstract {
if(empty($req['params'] )){
echo 'error';exit;
}
$params=base64_decode($req['params']);
$params=explode('&',$params);
$params=\Our\Common::paramToJson($params);
echo json_encode($params);exit;
$this->_view->assign("params", $params);
}
......
......@@ -334,6 +334,15 @@ public static function convertArrKey($arr, $key_name)
json_decode($string);
return (json_last_error() == JSON_ERROR_NONE);
}
public static function paramToJson($param)
{
$array = array();
$paramArrs = explode('&', $param);
foreach ($paramArrs as $paramArr) {
$array[strstr($paramArr, '=', true)] = substr(strstr($paramArr, '='), 1);
}
return $array;
}
/**
* sql字符串格式化
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment