本文整理汇总了PHP中configure_cron函数的典型用法代码示例。如果您正苦于以下问题:PHP configure_cron函数的具体用法?PHP configure_cron怎么用?PHP configure_cron使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了configure_cron函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: handle_wireless_post
if (isset($wancfg['wireless'])) {
handle_wireless_post();
}
conf_mount_ro();
write_config();
if (file_exists("{$g['tmp_path']}/.interfaces.apply")) {
$toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.interfaces.apply"));
} else {
$toapplylist = array();
}
$toapplylist[$if]['ifcfg'] = $old_wancfg;
$toapplylist[$if]['ppps'] = $old_ppps;
file_put_contents("{$g['tmp_path']}/.interfaces.apply", serialize($toapplylist));
mark_subsystem_dirty('interfaces');
/* regenerate cron settings/crontab file */
configure_cron();
header("Location: interfaces.php?if={$if}");
exit;
}
}
}
}
// end if ($_POST)
function handle_wireless_post()
{
global $_POST, $config, $g, $wancfg, $if, $wl_countries_attr, $wlanbaseif;
if (!is_array($wancfg['wireless'])) {
$wancfg['wireless'] = array();
}
$wancfg['wireless']['standard'] = $_POST['standard'];
$wancfg['wireless']['mode'] = $_POST['mode'];
示例2: snort_deinstall_cron
function snort_deinstall_cron($cronmatch)
{
global $config, $g;
if (!$config['cron']['item']) {
return;
}
$x = 0;
$is_installed = false;
foreach ($config['cron']['item'] as $item) {
if (strstr($item['command'], $cronmatch)) {
$is_installed = true;
break;
}
$x++;
}
if ($is_installed == true) {
unset($config['cron']['item'][$x]);
}
configure_cron();
}