$id = "sdgs" $object_id = new \MongoDB\BSON\ObjectId($id) $id = (string)$object_id 转载于:https://my.oschina.net/PHPDOTAER/blog/3093103