传递参数

wsk/addorder?goods=[{"gsn":802006,"number":1},{"gsn":103761,"number":3}]

错误:

$goods = $_GET['goods'];
print_r(json_decode($goods,true));

 

正确:

$goods = $_GET['goods'];
json = iconv('GBK','utf-8',$goods);
//$json = stripslashes($json);
$json = htmlspecialchars_decode($json);
print_r(json_decode($json,true));

 

相关文章:

  • 2022-12-23
  • 2021-08-14
  • 2021-10-11
  • 2021-06-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-04
猜你喜欢
  • 2021-10-21
  • 2022-12-23
  • 2022-12-23
  • 2021-07-20
  • 2021-07-07
  • 2022-01-08
  • 2022-12-23
相关资源
相似解决方案