对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。

MongoDB\GridFS\Bucket::drop()

MongoDB\GridFS\Bucket::drop()

删除与此 GridFS 存储桶关联的文件和数据块collection。

function drop(): void

MongoDB\ 驱动程序\Exception\RuntimeException 用于扩展级别的其他错误(例如连接错误)。

<?php $database = (new MongoDB\Client)->test; $bucket = $database->getGridFSBucket(); $stream = fopen('php://temp', 'w+b');fwrite($stream, "foobar");rewind($stream); $bucket->uploadFromStream('filename', $stream); $bucket->drop();
给本页内容打分