[ Index ]
 

Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/includes/init_includes/ -> init_gzip.php (source)

   1  <?php
   2  /**

   3   * if gzip_compression is enabled, start to buffer the output

   4   * see {@link  http://www.zen-cart.com/wiki/index.php/Developers_API_Tutorials#InitSystem wikitutorials} for more details.

   5   *

   6   * @package initSystem

   7   * @copyright Copyright 2003-2005 Zen Cart Development Team

   8   * @copyright Portions Copyright 2003 osCommerce

   9   * @todo ICW note some of this can go if we move to php>4.2

  10   * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

  11   * @version $Id: init_gzip.php 2753 2005-12-31 19:17:17Z wilt $

  12   */
  13  if (!defined('IS_ADMIN_FLAG')) {
  14    die('Illegal Access');
  15  }
  16  if ( (GZIP_LEVEL == '1') && ($ext_zlib_loaded = extension_loaded('zlib')) && (PHP_VERSION >= '4') ) {
  17    if (($ini_zlib_output_compression = (int)ini_get('zlib.output_compression')) < 1) {
  18      if (PHP_VERSION >= '4.0.4') {
  19        ob_start('ob_gzhandler');
  20      } else {
  21        /**

  22         * include the gzip compression functions

  23         */
  24        include(DIR_WS_FUNCTIONS . 'gzip_compression.php');
  25        ob_start();
  26        ob_implicit_flush();
  27      }
  28    } else {
  29      @ini_set('zlib.output_compression_level', GZIP_LEVEL);
  30    }
  31  }
  32  ?>


Généré le : Mon Nov 26 16:45:43 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics