MongoGridFSFile::write

(PECL mongo >=0.9.0)
Writes this file to the filesystem
public int MongoGridFSFile::write ([ string $filename = NULL ] )
Parameters:
filename

The location to which to write the file. If none is given, the stored filename will be used.

Returns:

Returns the number of bytes written.

Examples:
MongoGridFSFile::write() example
1
2
3
4
5
6
7
<?php
 
$images $db->my_db->getGridFS('images');
 
$image $images->findOne('jwage.png');
$image->write('/path/to/write/jwage.png');
?>
doc_php
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.