示例#1
0
    public function save($content, $path)
    {
        $content = '<?php
		if(extension_loaded(\'zlib\')){
			ob_start(\'ob_gzhandler\');
		}
		header ("content-type: text/javascript; charset: utf-8");
		header ("cache-control: must-revalidate");
		$last_modified_time = filemtime(__FILE__);
		header("Last-Modified: ".date("D, d M Y H:i:s", $last_modified_time)." GMT");
		$offset = 60 * 60 * 24 * 7;
		$expire = "expires: " . gmdate ("D, d M Y H:i:s", time() + $offset) . " GMT";
		header ($expire);
		?>
		' . $content . '
		<?php
		if(extension_loaded(\'zlib\')){
			ob_end_flush();
		}?>';
        parent::save($content, $path);
    }