downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

MongoGridFSFile::getFilename> <MongoGridfsFile::__construct
[edit] Last updated: Fri, 25 May 2012

view this page in

MongoGridFSFile::getBytes

(PECL mongo >=0.9.0)

MongoGridFSFile::getBytesこのファイルの内容をバイト文字列で返す

説明

public string MongoGridFSFile::getBytes ( void )

これはファイルをメモリに読み込みます。 ファイルのサイズがメモリの量より大きい場合は問題が発生することに注意しましょう。

パラメータ

この関数にはパラメータはありません。

返り値

ファイルの内容をバイト文字列で返します。

例1 MongoGridFSFile::getBytes() の例

<?php

$images 
$db->my_db->getGridFS('images');

$image $images->findOne('jwage.png');

header('Content-type: image/png;');
echo 
$image->getBytes();
?>


add a note add a note User Contributed Notes MongoGridFSFile::getBytes
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites