本文整理汇总了PHP中maincf_multi::header_checks方法的典型用法代码示例。如果您正苦于以下问题:PHP maincf_multi::header_checks方法的具体用法?PHP maincf_multi::header_checks怎么用?PHP maincf_multi::header_checks使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类maincf_multi
的用法示例。
在下文中一共展示了maincf_multi::header_checks方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: headers_check
function headers_check($noreload = 0, $nowhiteblack = 0)
{
$unix = new unix();
$headersFiles = array();
$main = new maincf_multi("master", "master");
echo "Starting......: " . date("H:i:s") . " Loading header_checks()\n";
$headers = $main->header_checks();
$headers = str_replace("header_checks =", "", $headers);
if (is_file("/etc/postfix/blacklist.headers.cf")) {
$headersFiles[] = "regexp:/etc/postfix/blacklist.headers.cf";
}
if ($headers != null) {
$headersFiles[] = $headers;
}
if (count($headersFiles) > 0) {
postconf("header_checks", @implode(", ", $headersFiles));
} else {
postconf("header_checks", null);
}
if ($nowhiteblack == 0) {
$nohup = $unix->find_program("nohup");
echo "Starting......: " . date("H:i:s") . " Running exec.white-black-central.php\n";
system("{$nohup} " . LOCATE_PHP5_BIN2() . " /usr/share/artica-postfix/exec.white-black-central.php >/dev/null 2>&1 &");
}
if ($noreload == 0) {
echo "Starting......: " . date("H:i:s") . " Reloading Postfix...\n";
ReloadPostfix(true);
}
}
示例2: headers_check
function headers_check($noreload = 0)
{
$unix = new unix();
$main = new maincf_multi("master", "master");
echo "Starting......: " . date("H:i:s") . " Loading header_checks()\n";
$headers = $main->header_checks();
$headers = str_replace("header_checks =", "", $headers);
if ($headers != null) {
postconf("header_checks", $headers);
} else {
postconf("header_checks", null);
}
$nohup = $unix->find_program("nohup");
echo "Starting......: " . date("H:i:s") . " Running exec.white-black-central.php\n";
system("{$nohup} " . LOCATE_PHP5_BIN2() . " /usr/share/artica-postfix/exec.white-black-central.php >/dev/null 2>&1 &");
if ($noreload == 0) {
echo "Starting......: " . date("H:i:s") . " Reloading Postfix...\n";
ReloadPostfix(true);
}
}