當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CASHSystem::startUp方法代碼示例

本文整理匯總了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;
開發者ID:JamesLinus,項目名稱:platform,代碼行數:31,代碼來源:controller.php

示例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();
開發者ID:blacktire,項目名稱:DIY,代碼行數:22,代碼來源:cashmusic.php


注:本文中的CASHSystem::startUp方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。