<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class MY_Output extends CI_Output
{
// HOOK: 防止写垃圾缓存
function _write_cache($output)
{
  $CI = &get_instance();
  $t = $CI->uri->uri_string;
  $CI->uri->uri_string = implode('/', $CI->uri->good_rsegment_array());
  if ('/' == substr($t, 0, 1))
  {
   $CI->uri->uri_string = '/'.$CI->uri->uri_string;
  }
  parent::_write_cache($output);
  // 恢复 uri string ，以供其他物件调用
  $CI->uri->uri_string = $t;
}
} // END class MY_Output
