Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Kompres {
- function compress(){
- $CI =& get_instance();
- $buffer = $CI->output->get_output();
- $search = array(
- '/\>[^\S ]+/s',
- '/[^\S ]+\#/s',
- );
- $replace = array(
- '>',
- '<',
- '\\1',
- "//<![CDATA[\n".'\1'."\n//]]>",
- );
- $buffer = preg_replace($search, $replace, $buffer);
- $CI->output->set_output($buffer);
- $CI->output->_display();
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement