本文整理汇总了PHP中rex_path::init方法的典型用法代码示例。如果您正苦于以下问题:PHP rex_path::init方法的具体用法?PHP rex_path::init怎么用?PHP rex_path::init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rex_path
的用法示例。
在下文中一共展示了rex_path::init方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
foreach (['HTDOCS_PATH', 'BACKEND_FOLDER', 'REDAXO'] as $key) {
if (!isset($REX[$key])) {
throw new Exception('Missing required global variable $REX[\'' . $key . "']");
}
}
// start output buffering as early as possible, so we can be sure
// 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
示例2: Exception
if (!isset($REX[$key])) {
throw new Exception('Missing required global variable $REX[\'' . $key . "']");
}
}
// start output buffering as early as possible, so we can be sure
// 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';
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