略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: MongoGridFS::__construct

2024-12-23

MongoGridFS::__construct

(PECL mongo >=0.9.0)

MongoGridFS::__constructCreates new file collections

说明

public MongoGridFS::__construct ( MongoDB $db [, string $prefix = "fs" [, mixed $chunks = "fs" ]] )

Files as stored across two collections, the first containing file meta information, the second containing chunks of the actual file. By default, fs.files and fs.chunks are the collection names used.

Use one argument to specify a prefix other than "fs":

$fs = new MongoGridFS($db, "myfiles");
uses myfiles.files and myfiles.chunks collections.

参数

db

Database.

files

Optional collection name prefix.

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/mongogridfs.construct.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3