the query data is printed to see that _ id is objectID,. If it is directly converted to json,_id, it will be empty. Can you change objectID to string, and then to json?
the query data is printed to see that _ id is objectID,. If it is directly converted to json,_id, it will be empty. Can you change objectID to string, and then to json?
Yes, add a (string) type directly before _ id
ex: $info ['objectID'] = (string) $info [' _ id'];
Previous: How to check whether Global Register for opline and execute_data is open or not
Next: How does an application built by a request Electron set up a command line operation?
mongodb can be connected through php connection without permission authentication, and the data can be read out. $con = new MongoClient(); but after adding user rights authentication, it keeps prompting fatal error, authentication failed, etc., tha...
previously used the Mongo extension used by PHP5, but after upgrading to PHP7, instead of using MongoDB, use the composer package jenssegers mongodb. refer to upgrade PHP7 Operation MongoDB this article PHP MongoDB BulkWriteException: waiting for r...
error message: PHP Fatal error: Uncaught MongoDB Driver Exception RuntimeException: Invalid reply to find command. in ... library MongoDB Operation Find.php:299 Stack trace: -sharp0 ... library MongoDB Operation Find.php(299): MongoDB Drive...
pecl install mongodb fails: fatal error: Security Security.h file not found ERROR: make failed private tmp pear install mongodb src libmongoc src libmongoc src mongoc mongoc-rand-common-crypto.c:25:10: fatal error: Security Security.h ...
mongodb is the way key-value is stored, and like redis, their value supports multiple data types. how to understand the document storage of MongoDB, does it mean that it can store word documents or Excel or pictures directly? Unlike mysql, it is the pa...
related codes Please paste the code text below (do not replace the code with pictures) official documents should be from a long time ago. Is there any latest technical point pecl download mongodb cd mongodb-1.5.2 vim src libmongoc src libmong...