MongoGridFSFile::getBytes
(PECL mongo >=0.9.0)
MongoGridFSFile::getBytes — بازگرداندن محتوای این فایل به عنوان رشته بایتها
Description
public string MongoGridFSFile::getBytes
( void
)
هشدار: این متد فایل را در حافظه بارگذاری خواهد کرد. اگر فایل بزرگتر از حافظه باشد مشکل پیش خواهد آمد.
Parameters
This function has no parameters.
Return Values
بازگرداندن رشته به بایت در فایل.
Examples
Example #1 مثال MongoGridFSFile::getBytes()
<?php
$images = $db->my_db->getGridFS('images');
$image = $images->findOne('jwage.png');
header('Content-type: image/png;');
echo $image->getBytes();
?>
There are no user contributed notes for this page.
