Monday, August 8, 2011

Enable GZIP in YII Application

Just add the following lines to protected/config/main.php,

add the below 2 lines after   'preload' => array('log'),

'onBeginRequest' => create_function('$event', 'return ob_start("ob_gzhandler");'),
'onEndRequest' => create_function('$event', 'return ob_end_flush();'),

1 comment:

Radley Co Tad said...


I have read your blog its very attractive and impressive. I like it your blog.

PHP Training in chennai | PHP Training Course

PHP Training in chennai | Online PHP Course