|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-07-18 18:02 UTC] sniper@php.net
[2010-12-20 11:44 UTC] jani@php.net
-Package: Tidy
+Package: Output Control
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 05:00:01 2025 UTC |
I wanted to process the output buffer by myself first to 'tidy up' HTML/JavaScript code a bit and then use the gzip-compression for a faster transfer. I used this demo script to test this: <?php function my_ob_handler($x) { # this normally tidies html code.... return strtoupper($x); } function proc_out($x) { return ob_gzhandler(my_ob_handler($x)); #return my_ob_handler($x); } if (ob_get_length() === false) { #ob_start("ob_gzhandler"); ob_start("proc_out"); } ?> abcABCabc12345 . When I only set "ob_gzhandler" as output handler, it works and I see the text. When I use "proc_out" and don't call "ob_gzhandler" by myself, it also works. But when I want to use both handlers in queue, I get nothing at all. My provider uses PHP 4.1.1 and I can't upgrade it! I have PHP 4.2.1 at home but with no zlib support to test this.