We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 890d701 commit f93fca7Copy full SHA for f93fca7
README.md
@@ -82,10 +82,16 @@ $stream = new Http\Stream(
82
83
#### Write to stream
84
```php
85
-$stream = new Http\Stream(Http\Stream:TEMP);
86
-$stream->write("Hello world");
87
-$stream->seek(0);
88
-echo $stream->read(); // Hello world
+$stream = new Http\Stream(Http\Stream::TEMP);
+if ($stream->isSeekable()) {
+ $stream->write("Hello world");
+ //echo $stream; // will print Hello world
89
+ // Or
90
+ $stream->rewind();
91
+ echo $stream->getContents(); // Hello world
92
+ // Or Same as above
93
+ //echo $stream->read($stream->getSize());
94
+}
95
```
96
97
#### Get file content with stream
0 commit comments