How to read content from 'php://output' stream

201 views Asked by At

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.

1

There are 1 answers

1
Jay Blanchard On

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.