当前位置: 首页>>代码示例>>PHP>>正文


PHP config::get_cfg_value方法代码示例

本文整理汇总了PHP中config::get_cfg_value方法的典型用法代码示例。如果您正苦于以下问题:PHP config::get_cfg_value方法的具体用法?PHP config::get_cfg_value怎么用?PHP config::get_cfg_value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在config的用法示例。


在下文中一共展示了config::get_cfg_value方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: header

/* Check if we need to run setup */
if (!file_exists(CONFIG_DIR . '/' . CONFIG_FILE)) {
    header('location:setup.php');
    exit;
}
/* Check if fusiondirectory.conf (.CONFIG_FILE) is accessible */
if (!is_readable(CONFIG_DIR . '/' . CONFIG_FILE)) {
    msg_dialog::display(_('Configuration error'), sprintf(_('FusionDirectory configuration %s/%s is not readable. Please run fusiondirectory-setup --check-config to fix this.'), CONFIG_DIR, CONFIG_FILE), FATAL_ERROR_DIALOG);
    exit;
}
/* Parse configuration file */
$config = new config(CONFIG_DIR . '/' . CONFIG_FILE, $BASE_DIR);
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    session::global_set('DEBUGLEVEL', 0);
} else {
    session::global_set('DEBUGLEVEL', $config->get_cfg_value('DEBUGLEVEL'));
    @DEBUG(DEBUG_CONFIG, __LINE__, __FUNCTION__, __FILE__, $config->data, 'config');
}
/* Set template compile directory */
$smarty->compile_dir = $config->get_cfg_value('templateCompileDirectory', SPOOL_DIR);
/* Check for compile directory */
if (!(is_dir($smarty->compile_dir) && is_writable($smarty->compile_dir))) {
    msg_dialog::display(_('Smarty error'), sprintf(_('Directory "%s" specified as compile directory is not accessible!'), $smarty->compile_dir), FATAL_ERROR_DIALOG);
    exit;
}
/* Check for old files in compile directory */
clean_smarty_compile_dir($smarty->compile_dir);
initLanguage();
$smarty->assign('nextfield', 'username');
if (isset($_POST['server'])) {
    $server = $_POST['server'];
开发者ID:misel228,项目名称:fusiondirectory,代码行数:31,代码来源:index.php

示例2: elseif

} elseif (isset($_GET['directory'])) {
    $directory = $_GET['directory'];
} else {
    $directory = $config->data['MAIN']['DEFAULT'];
    if (!isset($servers[$directory])) {
        $directory = key($servers);
    }
}
// Set location and reload the configRegistry - we've now access to the ldap.
if (isset($servers[$directory])) {
    $config->set_current($directory);
    $config->check_and_reload();
    $config->configRegistry->reload(TRUE);
}
session::global_set('plist', new pluglist($config, $ui));
session::global_set('debugLevel', $config->get_cfg_value("core", "debugLevel"));
if ($_SERVER["REQUEST_METHOD"] != "POST") {
    @DEBUG(DEBUG_CONFIG, __LINE__, __FUNCTION__, __FILE__, $config->data, "config");
}
/* Set template compile directory */
$smarty->compile_dir = $config->get_cfg_value("core", "templateCompileDirectory");
/* Check for compile directory */
if (!(is_dir($smarty->compile_dir) && is_writable($smarty->compile_dir))) {
    msg_dialog::display(_("Configuration error"), sprintf(_("Compile directory %s is not accessible!"), bold($smarty->compile_dir)), FATAL_ERROR_DIALOG);
    exit;
}
/* Check for old files in compile directory */
clean_smarty_compile_dir($smarty->compile_dir);
/* Language setup */
if ($config->get_cfg_value("core", "language") == "") {
    $lang = get_browser_language();
开发者ID:chrlutz,项目名称:limux-gosa,代码行数:31,代码来源:password.php

示例3: header

    header("location:setup.php");
    exit;
}
/* Reset errors */
session::set('errors', "");
/* Check if fusiondirectory.conf (.CONFIG_FILE) is accessible */
if (!is_readable(CONFIG_DIR . "/" . CONFIG_FILE)) {
    msg_dialog::display(_("Configuration error"), sprintf(_("FusionDirectory configuration %s/%s is not readable. Please run fusiondirectory-setup --check-config to fix this."), CONFIG_DIR, CONFIG_FILE), FATAL_ERROR_DIALOG);
    exit;
}
/* Parse configuration file */
$config = new config(CONFIG_DIR . "/" . CONFIG_FILE, $BASE_DIR);
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    session::global_set('DEBUGLEVEL', 0);
} else {
    session::global_set('DEBUGLEVEL', $config->get_cfg_value('DEBUGLEVEL'));
    @DEBUG(DEBUG_CONFIG, __LINE__, __FUNCTION__, __FILE__, $config->data, "config");
}
/* Set template compile directory */
$smarty->compile_dir = $config->get_cfg_value("templateCompileDirectory", SPOOL_DIR);
/* Check for compile directory */
if (!(is_dir($smarty->compile_dir) && is_writable($smarty->compile_dir))) {
    msg_dialog::display(_("Smarty error"), sprintf(_("Directory '%s' specified as compile directory is not accessible!"), $smarty->compile_dir), FATAL_ERROR_DIALOG);
    exit;
}
/* Check for old files in compile directory */
clean_smarty_compile_dir($smarty->compile_dir);
initLanguage();
$smarty->assign('nextfield', 'username');
if (isset($_POST['server'])) {
    $server = $_POST['server'];
开发者ID:nimakwan,项目名称:fusiondirectory,代码行数:31,代码来源:index.php

示例4: sprintf

    $smarty->assign("version", get_gosa_version());
    $smarty->display(get_template_path('login.tpl'));
    exit;
}
/*****************************************************************************
 *                               M   A   I   N                               *
 *****************************************************************************/
/* Check if gosa.conf (.CONFIG_FILE) is accessible */
if (!is_readable(CONFIG_DIR . "/" . CONFIG_FILE)) {
    msg_dialog::display(_("Configuration error"), sprintf(_("GOsa configuration %s/%s is not readable. Aborted."), CONFIG_DIR, CONFIG_FILE), FATAL_ERROR_DIALOG);
    exit;
}
/* Parse configuration file */
$config = new config(CONFIG_DIR . "/" . CONFIG_FILE, $BASE_DIR);
/* Set template compile directory */
$smarty->compile_dir = $config->get_cfg_value("core", "templateCompileDirectory");
$smarty->error_unassigned = true;
/* Check for compile directory */
if (!(is_dir($smarty->compile_dir) && is_writable($smarty->compile_dir))) {
    msg_dialog::display(_("Smarty error"), sprintf(_("Compile directory %s is not accessible!"), $smarty->compile_dir), FATAL_ERROR_DIALOG);
    exit;
}
/* Check for old files in compile directory */
clean_smarty_compile_dir($smarty->compile_dir);
/* Language setup */
$lang = get_browser_language();
putenv("LANGUAGE=");
putenv("LANG={$lang}");
setlocale(LC_ALL, $lang);
$GLOBALS['t_language'] = $lang;
$GLOBALS['t_gettext_message_dir'] = $BASE_DIR . '/locale/';
开发者ID:chrlutz,项目名称:limux-gosa,代码行数:31,代码来源:index.php


注:本文中的config::get_cfg_value方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。