|
update : 2015.11.03
php.shukuma.com검색:
|
MongoGridFS::findOne(PECL mongo >=0.9.0) MongoGridFS::findOne — Returns a single file matching the criteria 설명
public MongoGridFSFile MongoGridFS::findOne
([ mixed
$query = array()
[, mixed $fields = array()
]] )인수
반환값
Returns a MongoGridFSFile or 예제Example #1 MongoGridFS::findOne() example Example demonstrating how to find a single file from the MongoGridFS.
<?phpSee MongoGridFSFile for more information about how to work with files. 위 예제의 출력 예시:
MongoGridFSFile Object
(
[file] => Array
(
[_id] => MongoId Object
(
)
[filename] => filename.tgz
[uploadDate] => MongoDate Object
(
[sec] => 1274288014
[usec] => 467000
)
[chunkSize] => 262144
[md5] => d41d8cd98f00b204e9800998ecf8427e
)
[gridfs:protected] => MongoGridFS Object
(
[chunks] => MongoCollection Object
(
)
[filesName:protected] => downloads.files
[chunksName:protected] => downloads.chunks
)
)
|