Skip to content

Commit 9a07abc

Browse files
committed
Merge pull request #340
2 parents df57d68 + cd1166b commit 9a07abc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/tutorial/gridfs.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ To open a download stream and read from it:
8787
$bucket = (new MongoDB\Client)->example->selectGridFSBucket();
8888

8989
$stream = $bucket->openDownloadStream($fileId);
90-
$contents = file_get_contents($stream);
90+
$contents = stream_get_contents($stream);
9191

92-
To download the file all at once and write it to an writable stream:
92+
To download the file all at once and write it to a writable stream:
9393

9494
.. code-block:: php
9595

@@ -136,7 +136,7 @@ particular file:
136136
$bucket = (new MongoDB\Client)->example->selectGridFSBucket();
137137

138138
$stream = $bucket->openDownloadStreamByName('my-file.txt', ['revision' => 0]);
139-
$contents = file_get_contents($stream);
139+
$contents = stream_get_contents($stream);
140140

141141
Deleting Files
142142
--------------

0 commit comments

Comments
 (0)