$params = json_decode(stripSlashes($_POST['p']), true);
在post过来的json数据如果要json_decode必须对post过来的数据stripSlashes下
本文介绍如何正确解析通过POST请求发送的JSON数据。当从客户端接收到带有slashes的JSON字符串时,需先使用stripSlashes移除slashes,然后用json_decode进行解析。
$params = json_decode(stripSlashes($_POST['p']), true);
在post过来的json数据如果要json_decode必须对post过来的数据stripSlashes下
3250

被折叠的 条评论
为什么被折叠?