本文整理汇总了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");
}
示例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;
示例3: getPieHtc
public function getPieHtc()
{
Piwik::serveStaticFile(PIWIK_INCLUDE_PATH . "/libs/CSS3PIE/PIE.htc", "text/x-component");
}
示例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);
示例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;