Formatting output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I would like to format the output of a PHP page into a single line and use
gzip compression too.

I know that i can use something like this to get in a single line ( will
workout on this function later to remove spaces ).

<?php
function my_function( $buffer )
{
                $str = str_replace( "\n" , " " , $buffer );
		return $str;
}

ob_start("my_function");

echo 'hello';

ob_end_flush();
?>

And gzip compression is used with

<?php
ob_start("ob_gzhandler");

echo 'hello';

ob_end_flush();
?>

Is there a way to "mix" those codes?

Thanks.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux