当前位置: 首页>>代码示例>>PHP>>正文


PHP writelogs_framework函数代码示例

本文整理汇总了PHP中writelogs_framework函数的典型用法代码示例。如果您正苦于以下问题:PHP writelogs_framework函数的具体用法?PHP writelogs_framework怎么用?PHP writelogs_framework使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了writelogs_framework函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: disks_scan

function disks_scan()
{
    $unix = new unix();
    $btrfs = $unix->find_program("btrfs");
    $blkid = $unix->find_program("blkid");
    $cmd = "{$btrfs} filesystem show 2>&1";
    writelogs_framework("{$cmd}", __FUNCTION__, __FILE__, __LINE__);
    exec($cmd, $results);
    while (list($num, $ligne) = each($results)) {
        if (preg_match("#Label:\\s+'(.*?)'\\s+uuid:\\s+(.+)#i", $ligne, $re)) {
            $UUID = $re[2];
            $array[$UUID]["LABEL"] = $re[1];
            $array[$UUID]["DEV"] = exec("{$blkid} -U {$UUID}");
            $array[$UUID]["MOUNTED"] = $unix->MOUNTED_PATH($array[$UUID]["DEV"]);
            $array[$UUID]["DF"] = $unix->BLKID_INFOS($array[$UUID]["DEV"]);
            continue;
        }
        if (preg_match("#Total devices.+?FS bytes used (.+)#", $ligne, $re)) {
            $array[$UUID]["USED"] = $re[1];
            continue;
        }
        if (preg_match("#devid\\s+([0-9]+)\\s+size\\s+(.+?)\\s+used\\s+(.+?)\\s+path\\s+(.+)#", $ligne, $re)) {
            writelogs_framework("{$UUID}: {$ligne}", __FUNCTION__, __FILE__, __LINE__);
            writelogs_framework("{$UUID}: {$re[4]}: SIZE: {$re[2]}", __FUNCTION__, __FILE__, __LINE__);
            $array[$UUID]["DEVICES"][$re[1]]["SIZE"] = $re[2];
            $array[$UUID]["DEVICES"][$re[1]]["USED"] = $re[3];
            $array[$UUID]["DEVICES"][$re[1]]["DEV"] = $re[4];
        }
    }
    echo "<articadatascgi>" . base64_encode(serialize($array)) . "</articadatascgi>";
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:31,代码来源:btrfs.php

示例2: save_server_config

function save_server_config(){
	$unix=new unix();
	$php5=$unix->LOCATE_PHP5_BIN();
	$nohup=$unix->find_program("nohup");
	$cmd=trim("$nohup $php5 /usr/share/artica-postfix/exec.amanda.php --build >/dev/null 2>&1 &");
	writelogs_framework("$cmd",__FUNCTION__,__FILE__,__LINE__);
	shell_exec($cmd);
}
开发者ID:rsd,项目名称:artica-1.5,代码行数:8,代码来源:amanda.php

示例3: build_conf

function build_conf()
{
    $unix = new unix();
    $nohup = $unix->find_program("nohup");
    $cmd = trim($nohup . " " . $unix->LOCATE_PHP5_BIN() . " /usr/share/artica-postfix/exec.ejabberd.php >/dev/null 2>&1 &");
    writelogs_framework("{$cmd}", __FUNCTION__, __FILE__, __LINE__);
    shell_exec($cmd);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:8,代码来源:jabber.php

示例4: restart

function restart()
{
    $unix = new unix();
    $nohup = $unix->find_program("nohup");
    $cmd = trim("{$nohup} /etc/init.d/artica-postfix restart ftp >/dev/null 2>&1 &");
    writelogs_framework("{$cmd}", __FUNCTION__, __FILE__, __LINE__);
    shell_exec($cmd);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:8,代码来源:pure-ftpd.php

示例5: restart

function restart()
{
    $unix = new unix();
    $nohup = $unix->find_program("nohup");
    $php5 = $unix->LOCATE_PHP5_BIN();
    $cmd = "{$nohup} {$php5} /usr/share/artica-postfix/exec.vsftpd.php --restart >/dev/null 2>&1 &";
    writelogs_framework("{$cmd}", __FUNCTION__, __FILE__, __LINE__);
    shell_exec($cmd);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:9,代码来源:vsftpd.php

示例6: NOHUP_EXEC

function NOHUP_EXEC($cmdline)
{
    $cmdline = str_replace(">/dev/null 2>&1 &", "", $cmdline);
    $unix = new unix();
    $nohup = $unix->find_program("nohup");
    $cmdfinal = "{$nohup} {$cmdline} >/dev/null 2>&1 &";
    writelogs_framework("{$cmdfinal}", __FUNCTION__, __FILE__, __LINE__);
    shell_exec($cmdfinal);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:9,代码来源:hd.php

示例7: per_user_mysql

function per_user_mysql()
{
    $unix = new unix();
    $php = $unix->LOCATE_PHP5_BIN();
    $cmd = "{$php} /usr/share/artica-postfix/exec.amavis-db.php --init";
    writelogs_framework($cmd, __FUNCTION__, __FILE__, __LINE__);
    shell_exec($cmd);
    shell_exec("/etc/init.d/amavis-db start");
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:9,代码来源:amavis.php

示例8: compile_rules

function compile_rules()
{
    $unix = new unix();
    $nohup = $unix->find_program("nohup");
    $php5 = $unix->LOCATE_PHP5_BIN();
    $cmd = trim("{$nohup} {$php5} /usr/share/artica-postfix/exec.squidguard.php --build >/dev/null 2>&1 &");
    shell_exec($cmd);
    writelogs_framework("{$cmd}", __FUNCTION__, __FILE__, __LINE__);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:9,代码来源:webfilter.php

示例9: save_client_server

function save_client_server()
{
    $unix = new unix();
    $php5 = $unix->LOCATE_PHP5_BIN();
    $nohup = $unix->find_program("nohup");
    $cmd = trim("{$nohup} {$php5} /usr/share/artica-postfix/exec.amanda.php --backup-server >/dev/null 2>&1 &");
    writelogs_framework("{$cmd}", __FUNCTION__, __FILE__, __LINE__);
    shell_exec($cmd);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:9,代码来源:amanda.php

示例10: smtp_notifs

function smtp_notifs()
{
    $unix = new unix();
    $php = $unix->LOCATE_PHP5_BIN();
    $nohup = $unix->find_program("nohup");
    $cmd = "{$nohup} {$php} /usr/share/artica-postfix/exec.squidguard.smtp.php --smtp --force >/dev/null 2>&1 &";
    writelogs_framework($cmd, __FUNCTION__, __FILE__, __LINE__);
    shell_exec($cmd);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:9,代码来源:squidguardweb.php

示例11: freeweb_modules

function freeweb_modules(){
	$unix=new unix();
	$apache2ctl=$unix->find_program("apache2ctl");
	if(!is_file($apache2ctl)){echo "<articadatascgi>".base64_encode(serialize(array("apache2ctl no such file")))."</articadatascgi>";return;}
	$cmd="$apache2ctl -t -D DUMP_MODULES 2>&1";
	exec("$cmd",$results);
	writelogs_framework("$cmd ". count($results)." rows",__FUNCTION__,__FILE__,__LINE__);
	echo "<articadatascgi>".base64_encode(serialize($results))."</articadatascgi>";
}
开发者ID:rsd,项目名称:artica-1.5,代码行数:9,代码来源:freeweb.php

示例12: delete_container

function delete_container()
{
    $unix = new unix();
    $nohup = $unix->find_program("nohup");
    $php = $unix->LOCATE_PHP5_BIN();
    $cmd = trim("{$php} /usr/share/artica-postfix/exec.containers.php --delete-container {$_GET["delete-container"]}");
    writelogs_framework("{$cmd}", __FUNCTION__, __FILE__, __LINE__);
    exec($cmd, $results);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:9,代码来源:containers.php

示例13: status

function status()
{
    $unix = new unix();
    $php5 = $unix->LOCATE_PHP5_BIN();
    $cmd = trim("{$php5} /usr/share/artica-postfix/exec.status.php --ftp-proxy --nowachdog 2>&1");
    exec($cmd, $results);
    writelogs_framework("{$cmd}", __FUNCTION__, __FILE__, __LINE__);
    echo "<articadatascgi>" . base64_encode(@implode("\n", $results)) . "</articadatascgi>";
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:9,代码来源:ftpproxy.php

示例14: backup_test_nas

function backup_test_nas()
{
    $unix = new unix();
    $php = $unix->LOCATE_PHP5_BIN();
    $cmd = "{$php} /usr/share/artica-postfix/exec.cyrus.backup.php --test-nas --verbose 2>&1";
    writelogs_framework("{$cmd}", __FUNCTION__, __FILE__, __LINE__);
    exec($cmd, $results);
    echo "<articadatascgi>" . base64_encode(serialize($results)) . "</articadatascgi>";
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:9,代码来源:sarg.php

示例15: tomysql

function tomysql()
{
    $unix = new unix();
    $nohup = $unix->find_program("nohup");
    $php5 = $unix->LOCATE_PHP5_BIN();
    $servername = $_GET["tomysql"];
    $cmd = trim("{$php5} /usr/share/artica-postfix/exec.openssl.php --mysql {$servername} 2>&1");
    exec($cmd, $results);
    writelogs_framework("{$cmd}", __FUNCTION__, __FILE__, __LINE__);
    echo "<articadatascgi>" . base64_encode(trim(@implode("\n", $results))) . "</articadatascgi>";
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:11,代码来源:openssl.php


注:本文中的writelogs_framework函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。