PHP获取接口数据:

$postStr = file_get_contents("php://input");//因为很多都设置了register_globals禁止,不能用$GLOBALS["HTTP_RAW_POST_DATA"];

php采用函数:file_get_contents('php://input'); ,如果 $GLOBALS['HTTP_ROW_POST_DATA'] 没有禁用,也可以使用这个来代替

返回的是json对象,转换成数组:$postArr = json_decode($postStr,TRUE);

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2021-11-04
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-23
  • 2022-12-23
  • 2021-10-18
相关资源
相似解决方案