我向控制器发送一个字符串,其中包含一个&。当我执行json_decode时,它会在该字符串中返回Disabled Key Characters。
例如:
"1204" : {
"phone" : {
"0" : "666666"
},
"idcontact" : "1211",
"firstName" : "User1",
"address" : {
"0" : {
"State" : "Madrid",
"Country" : "Spain",
"City" : "Madrid"
}
},
"urls" : {
},
"company" : "Restaurant & Cafe Bar",
"birthday" : "1987'/03'/09",
"email" : {
"0" : "user@restaurant.com"
},
"job" : "Owner",
"lastName" : "LastName"}
它返回。。
Disallowed Key Characters: Cafe Bar",
____"birthday" : "1987'/03'/09",
____"email" : {
______"0" : "user@restaurant.com"
____},
____"job" : "Owner",
____"lastName" : "LastName"}
我试着改变函数_clean_put_keys($str),但我不知道怎么做
我该如何解决?
您是否尝试添加'&'在配置文件的$config['permitted_uri_chars']
中?