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


PHP OSCOM::initialize方法代碼示例

本文整理匯總了PHP中OSC\OM\OSCOM::initialize方法的典型用法代碼示例。如果您正苦於以下問題:PHP OSCOM::initialize方法的具體用法?PHP OSCOM::initialize怎麽用?PHP OSCOM::initialize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OSC\OM\OSCOM的用法示例。


在下文中一共展示了OSCOM::initialize方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: header

// load server configuration parameters
if (file_exists('includes/local/configure.php')) {
    // for developers
    include 'includes/local/configure.php';
} else {
    include 'includes/configure.php';
}
if (DB_SERVER == '') {
    if (is_dir('install')) {
        header('Location: install/index.php');
        exit;
    }
}
require OSCOM_BASE_DIR . 'OSC/OM/OSCOM.php';
spl_autoload_register('OSC\\OM\\OSCOM::autoload');
OSCOM::initialize();
// set the type of request (secure or not)
if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' || isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) {
    $request_type = 'SSL';
    define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);
    // set the cookie domain
    $cookie_domain = HTTPS_COOKIE_DOMAIN;
    $cookie_path = HTTPS_COOKIE_PATH;
} else {
    $request_type = 'NONSSL';
    define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);
    $cookie_domain = HTTP_COOKIE_DOMAIN;
    $cookie_path = HTTP_COOKIE_PATH;
}
// set php_self in the local scope
$req = parse_url($_SERVER['SCRIPT_NAME']);
開發者ID:Akofelaz,項目名稱:oscommerce2,代碼行數:31,代碼來源:application_top.php

示例2: implode

require DIR_WS_CLASSES . 'shopping_cart.php';
require DIR_WS_FUNCTIONS . 'sessions.php';
require DIR_WS_CLASSES . 'language.php';
require DIR_WS_FUNCTIONS . 'localization.php';
require DIR_WS_FUNCTIONS . 'validations.php';
require DIR_WS_CLASSES . 'table_block.php';
require DIR_WS_CLASSES . 'box.php';
require DIR_WS_CLASSES . 'message_stack.php';
require DIR_WS_CLASSES . 'split_page_results.php';
require DIR_WS_CLASSES . 'object_info.php';
require DIR_WS_CLASSES . 'mime.php';
require DIR_WS_CLASSES . 'email.php';
require DIR_WS_CLASSES . 'upload.php';
require DIR_WS_CLASSES . 'action_recorder.php';
require DIR_WS_CLASSES . 'cfg_modules.php';
OSCOM::initialize('Admin');
// calculate category path
if (isset($_GET['cPath'])) {
    $cPath = $_GET['cPath'];
} else {
    $cPath = '';
}
if (tep_not_null($cPath)) {
    $cPath_array = tep_parse_category_path($cPath);
    $cPath = implode('_', $cPath_array);
    $current_category_id = $cPath_array[sizeof($cPath_array) - 1];
} else {
    $current_category_id = 0;
}
// the following cache blocks are used in the Tools->Cache section
// ('language' in the filename is automatically replaced by available languages)
開發者ID:tiansiyuan,項目名稱:oscommerce2,代碼行數:31,代碼來源:application_top.php


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