返回json格式报错:Inf and NaN cannot be JSON encoded

解决方法,对数据进行处理:

$res = unserialize(str_replace(array('NAN;','INF;'),'0;',serialize($res)));
发布了103 篇原创文章 · 获赞 167 · 访问量 18万+

猜你喜欢

转载自blog.csdn.net/msllws/article/details/103783602