Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我如何将这个 shell 翻译成 php:
db.products.find({}, {comments:{$slice: 5}}
你试过什么?
这看起来像一个非常简单的案例:
db->products->find( array(), array('comments' => array( '$slice' => 5 ) ) );
简单的翻译有什么特别的问题吗?