定义
错误/异常
MongoDB\ 驱动程序\Exception\RuntimeException 用于扩展级别的其他错误(例如连接错误)。
示例
$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();