PHP读取Mongodb数据报错,Cannot natively represent the long 8331412483000 on this platform

在使用PHP进行读取Mongo数据时,如果读取的int数据过大时,会自动转变为int64位。

并会报以下错误:

Cannot natively represent the long 8331412483000 on this platform

只要在需要的地方添加代码:

ini_set('mongo.long_as_object', 1);

 

posted @ 2016-05-03 11:56  iDark  阅读(822)  评论(0编辑  收藏  举报