php入库json信息 有些字符需要特殊处理
//组装
$test=array();
$test["k1"]= urlencode($k1);
$test["k2"]=urlencode($k2);
$test["k3"]=urlencode($k3);
$test= urldecode(json_encode($test));
echo $test."\n";
//exit;
//入库处理
$sql="update tblTest set test=unhex('".bin2hex($test)."') where sid="."'$sid'";
mysql_query($sql); //解析
$obj=json_decode($content,true);
$k1=$obj['k1'];
$k2=$obj['k2'];
$k3=$obj['k3'];