Commit 8dd779ec authored by Igor Wiedler's avatar Igor Wiedler

[stream] Fix rst formatting

parent 73fe0b17
...@@ -476,7 +476,7 @@ Streaming ...@@ -476,7 +476,7 @@ Streaming
It's possible to create a streaming response, which is important in cases It's possible to create a streaming response, which is important in cases
when you cannot buffer the data being sent. when you cannot buffer the data being sent.
code-block:: php .. code-block:: php
$app->get('/images/{file}', function ($file) use ($app) { $app->get('/images/{file}', function ($file) use ($app) {
if (!file_exists(__DIR__.'/images/'.$file)) { if (!file_exists(__DIR__.'/images/'.$file)) {
...@@ -493,7 +493,7 @@ code-block:: php ...@@ -493,7 +493,7 @@ code-block:: php
If you need to send chunks, make sure you call ``ob_flush`` and ``flush`` after If you need to send chunks, make sure you call ``ob_flush`` and ``flush`` after
every chunk. every chunk.
code-block:: php .. code-block:: php
$stream = function () { $stream = function () {
$fh = fopen('http://www.example.com/', 'rb'); $fh = fopen('http://www.example.com/', 'rb');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment