当前位置: 首页>>代码示例>>PHP>>正文


PHP Piwik::serveStaticFile方法代码示例

本文整理汇总了PHP中Piwik::serveStaticFile方法的典型用法代码示例。如果您正苦于以下问题:PHP Piwik::serveStaticFile方法的具体用法?PHP Piwik::serveStaticFile怎么用?PHP Piwik::serveStaticFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Piwik的用法示例。


在下文中一共展示了Piwik::serveStaticFile方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getJs

 /**
  * Output the merged JavaScript file.
  * This method is called when the asset manager is enabled.
  * 
  * @see core/AssetManager.php
  */
 public function getJs()
 {
     $jsMergedFile = Piwik_AssetManager::getMergedJsFileLocation();
     Piwik::serveStaticFile($jsMergedFile, "application/javascript; charset=UTF-8");
 }
开发者ID:neolf,项目名称:PIWIK4MOBILE,代码行数:11,代码来源:Controller.php

示例2: define

<?php

/**
 * Piwik - Open source web analytics
 *
 * @link http://piwik.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 * @version $Id: index.php 4151 2011-03-20 11:51:09Z vipsoft $
 */
/**
 * Tracker proxy
 */
if ($_SERVER['REQUEST_METHOD'] == 'POST' || !empty($_SERVER['QUERY_STRING'])) {
    include '../piwik.php';
    exit;
}
/**
 * piwik.js proxy
 *
 * @see core/Piwik.php
 */
define('PIWIK_INCLUDE_PATH', '..');
define('PIWIK_DOCUMENT_ROOT', '..');
define('PIWIK_USER_PATH', '..');
require_once PIWIK_INCLUDE_PATH . '/libs/upgradephp/upgrade.php';
require_once PIWIK_INCLUDE_PATH . '/core/Piwik.php';
$file = '../piwik.js';
Piwik::serveStaticFile($file, "application/javascript; charset=UTF-8");
exit;
开发者ID:Gninety,项目名称:Microweber,代码行数:29,代码来源:index.php

示例3: getPieHtc

 public function getPieHtc()
 {
     Piwik::serveStaticFile(PIWIK_INCLUDE_PATH . "/libs/CSS3PIE/PIE.htc", "text/x-component");
 }
开发者ID:Gninety,项目名称:Microweber,代码行数:4,代码来源:Controller.php

示例4: define

    define("PIWIK_USER_PATH", PIWIK_PATH_TEST_TO_ROOT);
    require_once PIWIK_PATH_TEST_TO_ROOT . '/core/Piwik.php';
    switch ($staticFileServerMode) {
        // The static file server calls Piwik::serveStaticFile with a null file
        case NULL_FILE_SRV_MODE:
            Piwik::serveStaticFile(null, TEST_FILE_CONTENT_TYPE);
            break;
            // The static file server calls Piwik::serveStaticFile with a non-existing file
        // The static file server calls Piwik::serveStaticFile with a non-existing file
        case GHOST_FILE_SRV_MODE:
            Piwik::serveStaticFile(TEST_FILE_LOCATION . ".ghost", TEST_FILE_CONTENT_TYPE);
            break;
            // The static file server calls Piwik::serveStaticFile with the test file
        // The static file server calls Piwik::serveStaticFile with the test file
        case TEST_FILE_SRV_MODE:
            Piwik::serveStaticFile(TEST_FILE_LOCATION, TEST_FILE_CONTENT_TYPE);
            break;
    }
    // Stops the execution of the whole file
    exit;
}
if (!defined('PIWIK_CONFIG_TEST_INCLUDED')) {
    require_once PIWIK_PATH_TEST_TO_ROOT . "/tests/config_test.php";
}
// If the static file server has not been requested, the standard unit test case class is defined
class Test_Piwik_serveStaticFile extends UnitTestCase
{
    public function tearDown()
    {
        parent::tearDown();
        chmod(TEST_FILE_LOCATION, 0644);
开发者ID:nnnnathann,项目名称:piwik,代码行数:31,代码来源:serveStaticFile.test.php

示例5: define

 * @version $Id: index.php 4642 2011-05-05 21:23:12Z matt $
 */

/**
 * Tracker proxy
 */
if($_SERVER['REQUEST_METHOD'] == 'POST' || !empty($_SERVER['QUERY_STRING'])) {
	include '../piwik.php';
	exit;
}

/**
 * piwik.js proxy
 *
 * @see core/Piwik.php
 */
define('PIWIK_INCLUDE_PATH', '..');
define('PIWIK_DOCUMENT_ROOT', '..');
define('PIWIK_USER_PATH', '..');

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

$file = '../piwik.js';

// There is no cache buster parameter so we don't set Expires: header 
$expireFarFuture = false;
Piwik::serveStaticFile($file, "application/javascript; charset=UTF-8", $expireFarFuture);

exit;
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:30,代码来源:index.php


注:本文中的Piwik::serveStaticFile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。