本文整理汇总了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');
}
示例2: SetReportsEmail
function SetReportsEmail($email)
{
$cfg = new ConfigFile(AMP_CONFIG);
return $cfg->SetValue('MAINTENANCE_REPORTS_EMAIL', $email);
}
示例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()';
}
示例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');
}
}
示例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;
}
示例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()';
}
示例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()';
}