|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-07-15 22:28 UTC] yohgaki@php.net
-Status: Open
+Status: Wont fix
-Package: Feature/Change Request
+Package: *General Issues
-Assigned To:
+Assigned To: mike
[2014-07-15 22:28 UTC] yohgaki@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 13:00:01 2025 UTC |
Description: ------------ I would like to request the ability to place output at the front of the existing buffer. I have placed an example CONOP in the 'Reproduce Code' section. I did some experimentation with nesting but it doesn't seem to help me, please see the 'Expected Result' section to see if I understand it correctly. Reproduce code: --------------- <? class Document { ... function __destruct() { /* * By the time I get here the document has accumulated * javascript, and stylesheet includes. My document * object ensures that these occur in the proper place * in the HTML document. */ //New output goes to the front of the buffer. ob_insert(); //write <html><head><title><style><script><body> tags $this->beginHTML(); //Return to normal buffering mode ob_append(); //write defered <script> and </body></html> tags $this->endHTML(); ob_end_flush(); //All done } ?> Expected result: ---------------- <? //Nesting doesn't seem to help ob_start(); print "1"; ob_start(); print "2"; ob_end_flush(); print "3"; ob_end_flush(); ?> output is: 123 not: 213 I need 213 not 123, see?