當前位置: 首頁>>代碼示例>>PHP>>正文


PHP VirtualHost::addParkedDomain方法代碼示例

本文整理匯總了PHP中VirtualHost::addParkedDomain方法的典型用法代碼示例。如果您正苦於以下問題:PHP VirtualHost::addParkedDomain方法的具體用法?PHP VirtualHost::addParkedDomain怎麽用?PHP VirtualHost::addParkedDomain使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在VirtualHost的用法示例。


在下文中一共展示了VirtualHost::addParkedDomain方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: elseif

    if (isset($cmdParameters['ns']) && is_array($cmdParameters['ns'])) {
        $ns = $cmdParameters['ns'];
    } elseif (isset($cmdParameters['ns'])) {
        $ns = array($cmdParameters['ns']);
    } else {
        $ns = array();
    }
    // Set parameters - mail exchange server(s)
    if (isset($cmdParameters['mx']) && is_array($cmdParameters['mx'])) {
        $mx = $cmdParameters['mx'];
    } elseif (isset($cmdParameters['mx'])) {
        $mx = array($cmdParameters['mx']);
    } else {
        $mx = array();
    }
    $rc = $vhost->addParkedDomain($cmdParameters['add-pdomain'], $ns, $mx);
    if ($rc === false) {
        Log::error('Error while adding new parked domain');
        exit(9);
    }
} elseif (isset($cmdParameters['remove-pdomain'])) {
    $rc = $vhost->removeParkedDomain($cmdParameters['remove-pdomain']);
    if ($rc === false) {
        Log::error('Error while removing parked domain');
        exit(9);
    }
} else {
    Log::error('Parameter error');
    exit(9);
}
exit;
開發者ID:noumenia,項目名稱:aetolos,代碼行數:31,代碼來源:parkeddomainsmanager.inc.php

示例2: exit

    exit(9);
}
// Convert passwd to use the new uid/gid
$rc = convertPasswd($vhost->home . '/' . $vhost->unixName . '/etc/' . $vhost->domainName . '/passwd', $uid, $gid);
if ($rc === false) {
    Log::error('Error while converting passwd format');
    exit(9);
}
// Set ownership for passwd and shadow
touch($vhost->home . '/' . $vhost->unixName . '/etc/' . $vhost->domainName . '/passwd');
chgrp($vhost->home . '/' . $vhost->unixName . '/etc/' . $vhost->domainName . '/passwd', 'dovecot');
touch($vhost->home . '/' . $vhost->unixName . '/etc/' . $vhost->domainName . '/shadow');
chgrp($vhost->home . '/' . $vhost->unixName . '/etc/' . $vhost->domainName . '/shadow', 'dovecot');
// Create parked domains and insert to database
foreach ($parkedDomains as $p) {
    $rc = $vhost->addParkedDomain($p);
    if ($rc === false) {
        Log::error('Error while adding new parked domain');
        exit(9);
    }
}
// Install forwarders
foreach ($forwarders as $d => $f) {
    installForwarder($vhost, $d, $f);
}
// Run restorecon to make sure all SELinux contexts are correct
exec('/usr/sbin/restorecon -r ' . escapeshellarg($vhost->home));
// Access rights - needs to be reset because it is overwritten during the untar procedure
chmod($vhost->home . '/' . $vhost->unixName . '/etc', 0751);
// Install cron
if ($cron != '') {
開發者ID:noumenia,項目名稱:aetolos,代碼行數:31,代碼來源:import.inc.php


注:本文中的VirtualHost::addParkedDomain方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。