本文整理汇总了PHP中squidbee::SaveToServer方法的典型用法代码示例。如果您正苦于以下问题:PHP squidbee::SaveToServer方法的具体用法?PHP squidbee::SaveToServer怎么用?PHP squidbee::SaveToServer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类squidbee
的用法示例。
在下文中一共展示了squidbee::SaveToServer方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: amavis
if(posix_getuid()<>0){die("Cannot be used in web server mode\n\n");}
include_once(dirname(__FILE__).'/ressources/class.templates.inc');
include_once(dirname(__FILE__).'/ressources/class.ini.inc');
include_once(dirname(__FILE__).'/ressources/class.main_cf.inc');
include_once(dirname(__FILE__).'/ressources/class.amavis.inc');
include_once(dirname(__FILE__).'/ressources/class.samba.inc');
include_once(dirname(__FILE__).'/ressources/class.squid.inc');
$main=new main_cf();
$main->save_conf();
$main->save_conf_to_server(1);
$amavis=new amavis();
$amavis->Save();
$amavis->SaveToServer();
$samba=new samba();
$samba->SaveToLdap();
$squid=new squidbee();
$squid->SaveToLdap();
$squid->SaveToServer();
system('/etc/init.d/artica-postfix restart postfix');
system('/etc/init.d/artica-postfix restart squid');
system('/etc/init.d/artica-postfix restart samba');
system('/usr/share/artica-postfix/bin/artica-install --cyrus-checkconfig');
system('/etc/init.d/artica-postfix restart imap');
system('/etc/init.d/artica-postfix restart saslauthd');
?>
示例2: delete_cache
function delete_cache()
{
$cachedir = base64_decode($_POST["delete-cache"]);
$squid = new squidbee();
unset($squid->cache_list[$cachedir]);
$sock = new sockets();
$squid->SaveToLdap(true);
$squid->SaveToServer(true);
$sock->getFrameWork("squid.php?remove-cache={$_POST["delete-cache"]}");
}
示例3: applysquid
function applysquid(){
$squid=new squidbee();
$squid->SaveToLdap();
$squid->SaveToServer();
echo applysquid_icon();
}
示例4: SQUID_DELETE_CACHE
function SQUID_DELETE_CACHE($value)
{
$value = unserialize(base64_decode($value));
if (!is_array($value)) {
send_email_events("Failed to add/modify squid cache (not an array)", null, "CLOUD");
return true;
}
include_once dirname(__FILE__) . '/ressources/class.squid.inc';
$sock = new sockets();
$squid = new squidbee();
unset($squid->cache_list[$value["cache_directory"]]);
$squid->SaveToLdap();
$squid->SaveToServer();
$sock = new sockets();
$SquidCacheTasks = unserialize(base64_decode($sock->GET_INFO("SquidCacheTask")));
$SquidCacheTasks[$value["cache_directory"]] = $_GET;
$sock->SaveConfigFile(base64_encode(serialize($SquidCacheTasks)), "SquidCacheTask");
$sock->getFrameWork("cmd.php?squid-build-caches=yes");
send_email_events("Success removing squid cache \"{$value["cache_directory"]}\"", "Squid was scheduled to be reloaded.\n", "CLOUD");
return true;
}
示例5: delete_cache
function delete_cache()
{
$cachedir = base64_decode($_POST["delete-cache"]);
$squid = new squidbee();
unset($squid->cache_list[$cachedir]);
$sock = new sockets();
$squid->SaveToLdap(true);
$squid->SaveToServer(true);
}
示例6: cache_save
function cache_save()
{
if ($_GET["cache_directory"] == null) {
echo "False:cache directory is null\n";
exit;
}
$squid = new squidbee();
$squid->cache_list[$_GET["cache_directory"]] = array("cache_type" => $_GET["cache_type"], "cache_dir_level1" => $_GET["cache_dir_level1"], "cache_dir_level2" => $_GET["cache_dir_level2"], "cache_size" => $_GET["size"]);
$squid->SaveToLdap();
$squid->SaveToServer();
}