piwik学习2(bootstrap.php)

调用:<pre name="code" class="php">/core/testMinimumPhpVersion.php<pre name="code" class="php">/libs/upgradephp/upgrade.php<pre name="code" class="php">/vendor/autoload.php //<span style="font-family: Arial, Helvetica, sans-serif;">Piwik is the main project,初次之外还有</span><span style="font-family: Arial, Helvetica, sans-serif;">// Piwik is installed as a dependency,目录为</span><span style="font-family: Arial, Helvetica, sans-serif;">/../../autoload.php</span>
 
 
 
预定义:<pre name="code" class="php">PIWIK_USER_PATH
 
需要学习的内容:<pre name="code" class="php">error_reporting<pre name="code" class="php">@ini_set
<pre name="code" class="php">ini_get
session_cache_limiter<pre name="code" class="php">@date_default_timezone_set('UTC');

 
 
 
 
<?php
/**
 * Bootstraps the Piwik application. //bootstrap: <span style="color: rgb(67, 67, 67); font-family: Arial, sans-serif; font-size: 14px;  line-height: 24px;"><strong>引导程序</strong></span>
 *
 * This file cannot be a class because it needs to be compatible with PHP 4.
 */

if (!defined('PIWIK_USER_PATH')) {
    define('PIWIK_USER_PATH', PIWIK_DOCUMENT_ROOT);
}

error_reporting(E_ALL | E_NOTICE);
@ini_set('display_errors', defined('PIWIK_DISPLAY_ERRORS') ? PIWIK_DISPLAY_ERRORS : @ini_get('display_errors'));
@ini_set('xdebug.show_exception_trace', 0);
@ini_set('magic_quotes_runtime', 0);

// NOTE: the code above must be PHP 4 compatible
require_once PIWIK_INCLUDE_PATH . '/core/testMinimumPhpVersion.php';

session_cache_limiter('nocache');
@date_default_timezone_set('UTC');

disableEaccelerator();

require_once PIWIK_INCLUDE_PATH . '/libs/upgradephp/upgrade.php';

// Composer autoloader
if (file_exists(PIWIK_INCLUDE_PATH . '/vendor/autoload.php')) {
    $path = PIWIK_INCLUDE_PATH . '/vendor/autoload.php'; // Piwik is the main project
} else {
    $path = PIWIK_INCLUDE_PATH . '/../../autoload.php'; // Piwik is installed as a dependency
}
require_once $path;

/**
 * Eaccelerator does not support closures and is known to be not comptabile with Piwik. Therefore we are disabling
 * it automatically. At this point it looks like Eaccelerator is no longer under development and the bug has not
 * been fixed within a year.
 *
 * @link https://github.com/piwik/piwik/issues/4439#comment:8
 * @link https://github.com/eaccelerator/eaccelerator/issues/12
 */
function disableEaccelerator()
{
    $isEacceleratorUsed = ini_get('eaccelerator.enable');
    if (!empty($isEacceleratorUsed)) {
        @ini_set('eaccelerator.enable', 0);
    }
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值