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


PHP ConfigFile::SetValue方法代码示例

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


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

示例1: action_setprefs

function action_setprefs($eventData)
{
    global $gEnv, $gStatus, $gLocale;
    $jp_cfg = new ConfigFile(CONFIG_PATH . 'jpcache.cfg', true);
    $jp_cfg->SetValue('CACHE_TIME', $eventData['cachetime']);
    $jp_cfg->SetValue('CACHE_ON', $eventData['cacheon'] == 'on' ? '1' : '0');
    $jp_cfg->SetValue('USE_GZIP', $eventData['usegzip'] == 'on' ? '1' : '0');
    $jp_cfg->SetValue('CACHE_POST', $eventData['cachepost'] == 'on' ? '1' : '0');
    $gStatus = $gLocale->GetStr('prefs_set.status');
}
开发者ID:alexpagnoni,项目名称:jpcache,代码行数:10,代码来源:jpcache.php

示例2: SetReportsEmail

 function SetReportsEmail($email)
 {
     $cfg = new ConfigFile(AMP_CONFIG);
     return $cfg->SetValue('MAINTENANCE_REPORTS_EMAIL', $email);
 }
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:5,代码来源:AmpolirosMaintenanceHandler.php

示例3: pass_edit

function pass_edit($eventData)
{
    global $hui_page;
    $log = new Logger(AMP_LOG);
    $ampcfg = new ConfigFile(AMP_CONFIG);
    $ampcfg->SetValue('AMP_NAME', $eventData['name']);
    $ampcfg->SetValue('AMP_DOMAIN', $eventData['domain']);
    $ampcfg->SetValue('AMP_DNS', $eventData['dns']);
    $log->LogEvent('Ampoliros', 'Changed Ampoliros network settings', LOGGER_NOTICE);
    $hui_page->mJavascript = 'parent.frames.header.location.reload()';
}
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:11,代码来源:network.php

示例4: pass_setadvanced

function pass_setadvanced($eventData)
{
    global $gPage_status, $gLocale, $gEnv, $gState;
    $amp_state = '';
    switch ($eventData['ampstate']) {
        case Ampoliros::STATE_DEBUG:
            $amp_state_str = 'DEBUG';
            $amp_state = 'debug';
            $amp = Ampoliros::instance('Ampoliros');
            $amp->setState(Ampoliros::STATE_DEVELOPMENT);
            // Do not set it to DEBUG
            break;
        case Ampoliros::STATE_DEVELOPMENT:
            $amp_state_str = 'DEVELOPMENT';
            $amp_state = 'development';
            $amp = Ampoliros::instance('Ampoliros');
            $amp->setState(Ampoliros::STATE_DEVELOPMENT);
            break;
        case AMP_STATE_PRODUCTION:
            $amp_state_str = 'PRODUCTION';
            $amp_state = 'production';
            $amp = Ampoliros::instance('Ampoliros');
            $amp->setState(Ampoliros::STATE_PRODUCTION);
            break;
    }
    if (strlen($amp_state)) {
        $gState = $eventData['ampstate'];
        $log = new Logger($gEnv['root']['log']);
        $amp_cfg = new ConfigFile(AMP_CONFIG);
        $amp_cfg->SetValue('AMP_STATE', $amp_state);
        //$gEnv['core']['state'] = $eventData['ampstate'];
        $log->LogEvent('Ampoliros', 'Changed Ampoliros state to ' . $amp_state_str, LOGGER_NOTICE);
        $gPage_status = $gLocale->GetStr('advancedset.status');
        //$hui_page->mJavascript = 'parent.frames.sum.location.reload()';
    } else {
        $gPage_status = $gLocale->GetStr('advancednotset.status');
    }
}
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:38,代码来源:ampadvanced.php

示例5: setAlertEvents

 public function setAlertEvents($events)
 {
     $cfg = new ConfigFile(AMP_CONFIG);
     $cfg->SetValue('ALERT_ON_WRONG_LOCAL_ROOT_LOGIN', $events['wronglocalrootlogin'] ? '1' : '0');
     $cfg->SetValue('ALERT_ON_WRONG_LOCAL_USER_LOGIN', $events['wronglocaluserlogin'] ? '1' : '0');
     $cfg->SetValue('ALERT_ON_WRONG_REMOTE_LOGIN', $events['wrongremotelogin'] ? '1' : '0');
     $cfg->SetValue('ALERT_ON_MODULE_OPERATION', $events['moduleoperation'] ? '1' : '0');
     $cfg->SetValue('ALERT_ON_MODULE_SITE_OPERATION', $events['modulesiteoperation'] ? '1' : '0');
     $cfg->SetValue('ALERT_ON_SITE_OPERATION', $events['siteoperation'] ? '1' : '0');
     return true;
 }
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:11,代码来源:SecurityLayer.php

示例6: pass_setcountry

function pass_setcountry($eventData)
{
    global $hui_mainstatus, $amp_locale, $hui_page;
    $log = new Logger(AMP_LOG);
    $amp_config = new ConfigFile(AMP_CONFIG);
    $amp_config->SetValue('AMP_COUNTRY', $eventData['country']);
    $log->LogEvent('Ampoliros', 'Changed Ampoliros root country', LOGGER_NOTICE);
    $hui_mainstatus->mArgs['status'] = $amp_locale->GetStr('countryset_status');
    $hui_page->mArgs['javascript'] = 'parent.frames.sum.location.reload()';
}
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:10,代码来源:locale.php

示例7: pass_setadvanced

function pass_setadvanced($eventData)
{
    global $hui_mainstatus, $amp_locale, $hui_page, $env, $hui_comments, $compressed_ob;
    $log = new Logger(AMP_LOG);
    $amp_cfg = new ConfigFile(AMP_CONFIG);
    $amp_cfg->SetValue('AMP_HUI_COMMENTS', $eventData['hui-comments'] == 'on' ? '1' : '0');
    $amp_cfg->SetValue('AMP_COMPRESSED_OB', $eventData['compressed-ob'] == 'on' ? '1' : '0');
    $hui_comments = 'false';
    $compressed_ob = 'false';
    if ($eventData['hui-comments'] == 'on') {
        $hui_comments = 'true';
    }
    if ($eventData['compressed-ob'] == 'on') {
        $compressed_ob = 'true';
    }
    $log->LogEvent('Ampoliros', 'Changed Ampoliros advanced interface settings', LOGGER_NOTICE);
    $hui_mainstatus->mArgs['status'] = $amp_locale->GetStr('advancedset_status');
    $hui_page->mArgs['javascript'] = 'parent.frames.sum.location.reload()';
}
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:19,代码来源:ampinterface.php


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