PHP Warning:  json_decode() expects parameter 1 to be string, array given in xxx.php on line 299

原因分析

  json_decode函数是用来解码json_encode编码后的函数,他的参数是必须是一个json字符串,上面的错误就是给json_decode传入的参数是一个数组导致的报错

解决方法

  根据错误行号找到代码段,检查是否给json_decode传入的不是一个json字符串。

相关文章:

  • 2021-11-06
  • 2022-12-23
  • 2021-06-08
  • 2021-09-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
猜你喜欢
  • 2022-01-02
  • 2021-12-25
  • 2021-08-22
  • 2021-12-06
  • 2021-12-23
  • 2021-09-15
  • 2021-08-13
相关资源
相似解决方案