本文整理匯總了PHP中VirtualHost::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP VirtualHost::delete方法的具體用法?PHP VirtualHost::delete怎麽用?PHP VirtualHost::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類VirtualHost
的用法示例。
在下文中一共展示了VirtualHost::delete方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: die
* @subpackage removevirtualhost
*/
// No direct access - loadable only
if (!defined('AET_IN')) {
die("No Access");
}
// Create virtual host object
$vhost = new VirtualHost($db);
// Set parameters
if (isset($cmdParameters['keep-home'])) {
$keepHome = true;
} else {
$keepHome = false;
}
// Delete from database
$rc = $vhost->delete($cmdParameters['remove-virtualhost'], $keepHome);
if ($rc === false) {
echo "[ERROR] Error while deleting virtual host.\n";
exit(9);
}
// Postfix
$feature = new Postfix();
$rc = $feature->exportVirtualHosts($db);
if ($rc === false) {
echo "[ERROR] Error while exporting Postfix configuration.\n";
exit(9);
}
// Reload Postfix
if (Config::read('postfix') === 'enabled') {
$feature->reload();
}