我想列出所有我有一个MongoDB的集合内的文件上检测到,但我不断收到此错误:整数溢出平台
MongoDB\Driver\Exception\InvalidArgumentException: Integer overflow detected on your platform: 1000000000 in (...):16 Stack trace: #0 {main}
我认为我收到此错误的原因以下值太大而不能成为整数。
我的代码:
try {
$mongo = new MongoDB\Driver\Manager('...');
$query = new MongoDB\Driver\Query([]);
$rows = $mongo->executeQuery('..', $query);
echo json_encode(iterator_to_array($rows));
} catch (MongoDB\Driver\Exception\Exception $e) {
echo $e;
}
我怎样才能解决这个问题呢?
谢谢。
您的集合中有多少文档具有 – Neodan
只有4个,每一个有9场,和我我收到这个错误的原因是我用来插入后来转换的纪元值的字段,这个字段的类型是Int64。 –
你使用哪个PHP版本(32位或64位)? – Neodan