本文整理汇总了PHP中CASHSystem::startUp方法的典型用法代码示例。如果您正苦于以下问题:PHP CASHSystem::startUp方法的具体用法?PHP CASHSystem::startUp怎么用?PHP CASHSystem::startUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CASHSystem
的用法示例。
在下文中一共展示了CASHSystem::startUp方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
***************************************************************************************************/
if (strrpos($_SERVER['REQUEST_URI'], 'controller.php') !== false) {
header('Location: ./');
exit;
}
/***************************************************************************************************
*
* INCLUDES AND STARTUP
*
***************************************************************************************************/
require_once __DIR__ . '/constants.php';
// instead of the previous require_once(CASH_PLATFORM_PATH) call, we manually
// load CASHSystem and set admin_primary_cash_request to the first CASHRequest set
include_once dirname(CASH_PLATFORM_PATH) . '/classes/core/CASHSystem.php';
include_once dirname(CASH_PLATFORM_PATH) . '/lib/mustache/Mustache.php';
$admin_primary_cash_request = CASHSystem::startUp(true);
// admin-specific autoloader
function cash_admin_autoloadCore($classname)
{
$file = ADMIN_BASE_PATH . '/classes/' . $classname . '.php';
if (file_exists($file)) {
require_once $file;
}
}
spl_autoload_register('cash_admin_autoloadCore');
// make an object to use throughout the pages
$cash_admin = new AdminCore($admin_primary_cash_request->sessionGet('cash_effective_user'), $admin_primary_cash_request);
$cash_admin->mustache_groomer = new Mustache();
$cash_admin->page_data['www_path'] = ADMIN_WWW_BASE_PATH;
$cash_admin->page_data['public_url'] = CASH_PUBLIC_URL;
$cash_admin->page_data['platform_version'] = CASHRequest::$version;
示例2:
<?php
/**
*
* This is the framework bootstrap script. It preps the environment (strips out
* stupid shit like magic quotes), includes required classes, and instantiates
* a CASH request ready to use — pre-populated with any REQUEST data that may
* have been passed to the page.
*
* (Usage: included at the top of all pages.)
*
* @package diy.org.cashmusic
* @author CASH Music
* @link http://cashmusic.org/
*
* Copyright (c) 2011, CASH Music
* Licensed under the Affero General Public License version 3.
* See http://www.gnu.org/licenses/agpl-3.0.html
*
**/
require 'classes/core/CASHSystem.php';
CASHSystem::startUp();