1

According to the docs php://output is only a writable stream, is there any way to read whatever was streamed to it as a content(possibilly a string);

$content = fopen('php://output',r);

tried above code but no use.

  • I mean, the obvious answer is that `php://output` is the output stream *for the current script*, so I would hope you already know what it contains. Can you add any more context? – iainn Mar 03 '20 at 14:54

1 Answers1

0

No, you cannot read from php://output From the docs

php://output is a write-only stream that allows you to write to the output buffer mechanism in the same way as print and echo.

Jay Blanchard
  • 34,243
  • 16
  • 77
  • 119
  • 1
    But the output buffer contents can be captured in the usual ways, so that hint from the manual there should be all that is needed ;-) – CBroe Mar 03 '20 at 14:57