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


PHP rex_url::init方法代碼示例

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


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

示例1: ob_start

ob_start();
ob_implicit_flush(0);
mb_internal_encoding('UTF-8');
// deactivate session cache limiter
session_cache_limiter(false);
// set arg_separator to get valid html output if session.use_trans_sid is activated
ini_set('arg_separator.output', '&');
require_once __DIR__ . '/lib/util/path.php';
require_once __DIR__ . '/lib/util/path_default_provider.php';
rex_path::init(new rex_path_default_provider($REX['HTDOCS_PATH'], $REX['BACKEND_FOLDER'], true));
require_once rex_path::core('lib/autoload.php');
// register core-classes  as php-handlers
rex_autoload::register();
// add core base-classpath to autoloader
rex_autoload::addDirectory(rex_path::core('lib'));
rex_url::init(new rex_path_default_provider($REX['HTDOCS_PATH'], $REX['BACKEND_FOLDER'], false));
// start timer at the very beginning
rex::setProperty('timer', new rex_timer($_SERVER['REQUEST_TIME_FLOAT']));
// add backend flag to rex
rex::setProperty('redaxo', $REX['REDAXO']);
// add core lang directory to rex_i18n
rex_i18n::addDirectory(rex_path::core('lang'));
// add core base-fragmentpath to fragmentloader
rex_fragment::addDirectory(rex_path::core('fragments/'));
// ----------------- FUNCTIONS
require_once rex_path::core('functions/function_rex_globals.php');
require_once rex_path::core('functions/function_rex_other.php');
// ----------------- VERSION
rex::setProperty('version', '5.0.0-beta1');
$cacheFile = rex_path::cache('config.yml.cache');
$configFile = rex_path::data('config.yml');
開發者ID:staabm,項目名稱:redaxo,代碼行數:31,代碼來源:boot.php

示例2: ob_start

// we can set http header whenever we want/need to
ob_start();
ob_implicit_flush(0);
mb_internal_encoding('UTF-8');
// deactivate session cache limiter
session_cache_limiter(false);
// set arg_separator to get valid html output if session.use_trans_sid is activated
ini_set('arg_separator.output', '&');
require_once __DIR__ . '/lib/util/path.php';
rex_path::init($REX['HTDOCS_PATH'], $REX['BACKEND_FOLDER']);
require_once rex_path::core('lib/autoload.php');
// register core-classes  as php-handlers
rex_autoload::register();
// add core base-classpath to autoloader
rex_autoload::addDirectory(rex_path::core('lib'));
rex_url::init($REX['HTDOCS_PATH'], $REX['BACKEND_FOLDER']);
// start timer at the very beginning
rex::setProperty('timer', new rex_timer($_SERVER['REQUEST_TIME_FLOAT']));
// add backend flag to rex
rex::setProperty('redaxo', $REX['REDAXO']);
// add core lang directory to rex_i18n
rex_i18n::addDirectory(rex_path::core('lang'));
// add core base-fragmentpath to fragmentloader
rex_fragment::addDirectory(rex_path::core('fragments/'));
// ----------------- FUNCTIONS
require_once rex_path::core('functions/function_rex_globals.php');
require_once rex_path::core('functions/function_rex_other.php');
// ----------------- VERSION
rex::setProperty('version', '5.0.0-alpha7');
$cacheFile = rex_path::cache('config.yml.cache');
$configFile = rex_path::data('config.yml');
開發者ID:skerbis,項目名稱:redaxo,代碼行數:31,代碼來源:boot.php

示例3: rex_path_default_provider

<?php

/**
 * YREWRITE Addon.
 *
 * @author jan.kristinus@yakamara.de
 *
 * @package redaxo\yrewrite
 *
 * @var rex_addon $this
 */
if (!rex::isBackend()) {
    rex_url::init(new rex_path_default_provider("/", "redaxo", false));
}
rex_yrewrite::setScheme(new rex_yrewrite_scheme());
rex_extension::register('PACKAGES_INCLUDED', function ($params) {
    rex_yrewrite::init();
    if (rex_request('rex_yrewrite_func', 'string') == 'robots') {
        $robots = new rex_yrewrite_seo();
        $robots->sendRobotsTxt();
    }
    // if anything changes -> refresh PathFile
    if (rex::isBackend()) {
        $extensionPoints = ['CAT_ADDED', 'CAT_UPDATED', 'CAT_DELETED', 'CAT_STATUS', 'ART_ADDED', 'ART_UPDATED', 'ART_DELETED', 'ART_STATUS', 'CLANG_UPDATED'];
        foreach ($extensionPoints as $extensionPoint) {
            rex_extension::register($extensionPoint, function (rex_extension_point $ep) {
                $params = $ep->getParams();
                $params['subject'] = $ep->getSubject();
                $params['extension_point'] = $ep->getName();
                rex_yrewrite::generatePathFile($params);
            });
開發者ID:tzfrs,項目名稱:redaxo_yrewrite,代碼行數:31,代碼來源:boot.php


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