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


PHP lxfile_mkdir函数代码示例

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


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

示例1: getweb_usage

 static function getweb_usage($name, $customer_name, $oldtime, $newtime, $d)
 {
     global $gbl, $sgbl, $login, $ghtml;
     $web_home = "{$sgbl->__path_httpd_root}";
     $log_path = "{$web_home}/{$name}/stats";
     $processedir = "{$sgbl->__path_customer_root}/{$customer_name}/__processed_stats/";
     lxfile_mkdir($processedir);
     $dir1 = "{$log_path}/";
     $files = lscandir_without_dot($dir1);
     $total = 0;
     foreach ($files as $file) {
         if (!strstr($file, "gz")) {
             $total += self::getEachwebfilequota("{$dir1}/{$file}", $oldtime, $newtime);
             $stat = stat("{$dir1}/{$file}");
             if ($stat['size'] >= 50 * 1024 * 1024) {
                 if (isOn($d->remove_processed_stats)) {
                     lxfile_rm("{$dir1}/{$file}");
                 } else {
                     lxfile_mv("{$dir1}/{$file}", getNotexistingFile($processedir, $file));
                 }
             }
         }
     }
     return $total;
 }
开发者ID:zseand,项目名称:kloxo,代码行数:25,代码来源:webtrafficlib.php

示例2: mebackup_main

function mebackup_main()
{
    global $gbl, $sgbl, $login, $ghtml;
    $progname = $sgbl->__var_program_name;
    $cprogname = ucfirst($progname);
    initProgram('admin');
    lxfile_mkdir("__path_program_home/selfbackup/self/__backup");
    $backup = $login->getObject('general')->selfbackupparam_b;
    $dbf = $sgbl->__var_dbf;
    $pass = trim(lfile_get_contents("__path_program_root/etc/conf/{$progname}.pass"));
    $vd = createTempDir("/tmp", "mebackup");
    $docf = "{$vd}/mebackup.dump";
    // Issue #671 - Fixed backup-restore issue
    //	exec("exec mysqldump --add-drop-table -u $progname -p$pass $dbf > $docf");
    system("exec mysqldump --add-drop-table -u {$progname} -p{$pass} {$dbf} > {$docf}");
    $string = @date('Y-M-d') . '-' . time();
    $bfile = "{$sgbl->__path_program_home}/selfbackup/self/__backup/{$progname}-scheduled-masterselfbackup-{$string}.zip";
    lxshell_zip($vd, $bfile, array("mebackup.dump"));
    lxfile_tmp_rm_rec($vd);
    if ($backup && $backup->isOn('selfbackupflag')) {
        try {
            lxbackup::upload_to_server($bfile, basename($bfile), $backup);
        } catch (Exception $e) {
            print "Sending warning to {$login->contactemail} ..\n";
            lx_mail(null, $login->contactemail, "{$cprogname} Self Database Backup Upload Failed on " . date('Y-M-d') . " at " . date('H') . " Hours", "{$cprogname} Backup upload Failed due to {$e->getMessage()}\n");
        }
    }
    $backup->rm_last_number = 20;
    $backup->nname = 'masterselfbackup';
    lxbackup::clear_extra_backups('selfbackup', 'self', $backup);
}
开发者ID:soar-team,项目名称:kloxo,代码行数:31,代码来源:mebackup.php

示例3: MakeSureDirectoryExists

 static function MakeSureDirectoryExists($name)
 {
     if (!lxfile_exists($name)) {
         lxfile_mkdir($name);
         lxfile_generic_chown($name, "lxlabs");
     }
 }
开发者ID:digideskio,项目名称:hypervm,代码行数:7,代码来源:lxbackuplib.php

示例4: fixlogdir_main

function fixlogdir_main()
{
    global $gbl, $sgbl, $login, $ghtml;
    $progname = $sgbl->__var_program_name;
    $logl = lscandir_without_dot("../log");
    lxfile_mkdir("../processed_log");
    @lunlink("../log/access_log");
    @lunlink("/usr/local/lxlabs/ext/php/error.log");
    $dir = getNotexistingFile("../processed_log", "proccessed");
    system("mv ../log ../processed_log/{$dir}");
    mkdir("../log");
    $list = lscandir_without_dot("../processed_log");
    foreach ($list as $l) {
        remove_directory_if_older_than_a_day("../processed_log/{$l}", 6);
    }
    foreach ($logl as $l) {
        lxfile_touch("../log/{$l}");
    }
    lxfile_generic_chown_rec("../log", "lxlabs:lxlabs");
    //
    // Related to Issue #15
    //
    lxfile_generic_chmod_rec("../log", "0640");
    lxfile_generic_chmod_rec("../processed_log", "0640");
    lxfile_generic_chmod("../log", "0700");
    lxfile_generic_chmod("../processed_log", "0700");
    lxfile_generic_chmod("../log/lighttpd_error.log", "0644");
    lxfile_generic_chmod("../log/access_log", "0644");
    lxfile_generic_chown("../log/lighttpd_error.log", "lxlabs:root");
    lxfile_generic_chown("../log/access_log", "lxlabs:root");
    //
    os_restart_program();
}
开发者ID:soar-team,项目名称:kloxo,代码行数:33,代码来源:fixlogdir.php

示例5: lxfile_disk_free_space

function lxfile_disk_free_space($dir)
{
    $dir = expand_real_root($dir);
    lxfile_mkdir($dir);
    $ret = disk_free_space($dir);
    $ret = round($ret / (1024 * 1024), 1);
    log_shell("Disk Space {$dir} {$ret}");
    return $ret;
}
开发者ID:hypervm-ng,项目名称:hypervm-ng,代码行数:9,代码来源:commonfslib.php

示例6: updateUpdate

 function updateUpdate($param)
 {
     lxfile_mkdir("img/custom");
     if ($_FILES['upload']['tmp_name']) {
         lxfile_rm("img/custom/{$this->nname}.gif");
         lxfile_mv($_FILES['upload']['tmp_name'], "img/custom/{$this->nname}.gif");
         lxfile_generic_chmod("img/custom/{$this->nname}.gif", "0755");
     }
     return $param;
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:10,代码来源:custombuttonlib.php

示例7: __xenimport_get_data

function __xenimport_get_data()
{
    lxfile_mkdir("/home/oldxenconfig-hypervm");
    $list = lscandir_without_dot("/etc/xen/oldxen");
    foreach ($list as $l) {
        $vm[] = __xenimport_parse_config("/etc/xen/oldxen/{$l}");
        //lxfile_mv("/etc/xen/$l", "/home/oldxenconfig-hypervm");
        lunlink("/etc/xen/auto/{$l}");
    }
    dprintr($vm);
    return $vm;
}
开发者ID:digideskio,项目名称:hypervm,代码行数:12,代码来源:xenimport__xenmax.php

示例8: create_main

function create_main()
{
    global $argc, $argv;
    global $gbl, $sgbl, $login, $ghtml;
    $opt = parse_opt($argv);
    if (file_exists('/usr/local/lxlabs/.git')) {
        $opt['development_found'] = '1';
    }
    lxfile_mkdir("{$sgbl->__path_program_etc}/conf");
    lxfile_mkdir("{$sgbl->__path_program_root}/pid");
    lxfile_mkdir("{$sgbl->__path_program_root}/log");
    lxfile_mkdir("{$sgbl->__path_httpd_root}");
    os_create_program_service();
    if (isset($opt['admin-password'])) {
        $admin_pass = $opt['admin-password'];
    } else {
        $admin_pass = 'admin';
    }
    if ($opt['install-type'] == 'master') {
        if (!isset($opt['development_found'])) {
            create_mysql_db('master', $opt, $admin_pass);
            create_database();
            create_general();
            add_admin($admin_pass);
            create_servername();
            lxshell_return("__path_php_path", "../bin/collectquota.php");
        } else {
            print "Development GIT version found. Skipping creation from scratch of HyperVM-NG.\n";
        }
        print "Updating the system. Will take a while\n";
        system("/usr/local/lxlabs/ext/php/php ../bin/common/updatecleanup-main.php --type=master");
    } else {
        if ($opt['install-type'] == 'slave') {
            if (!isset($opt['development_found'])) {
                init_slave($admin_pass);
            } else {
                print "Development GIT version found. Skipping creation from scratch of HyperVM-NG.\n";
            }
            print "Updating the system. Will take a while\n";
            system("/usr/local/lxlabs/ext/php/php ../bin/common/updatecleanup-main.php --type=slave");
        } else {
            print "Unknown Install type\n";
            flush();
        }
    }
    system("rm -f /etc/sysconfig/network-scripts/ifcfg-*-range*");
    //system("$sgbl->__path_php_path ../bin/misc/fixcentos5xen.php");
    //os_fix_some_permissions();
    system("cp ../sbin/lxxen ../sbin/lxopenvz /usr/bin");
    system("chmod 4755 /usr/bin/lxxen /usr/bin/lxopenvz");
    //os_set_iis_ftp_root_path();
}
开发者ID:hypervm-ng,项目名称:hypervm-ng,代码行数:52,代码来源:create.php

示例9: __xenimport_get_data

function __xenimport_get_data()
{
    lxfile_mkdir("/home/oldxenconfig-hypervm");
    $list = lscandir_without_dot("/home/xen");
    foreach ($list as $l) {
        if (!cse($l, ".vm")) {
            continue;
        }
        $vm[] = __xenimport_parse_config("/home/xen/{$l}/{$l}.cfg");
        //lxfile_mv("/etc/xen/$l", "/home/oldxenconfig-hypervm");
    }
    dprintr($vm);
    return $vm;
}
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:14,代码来源:xenimport__hypervm.php

示例10: createVirtualHost

 function createVirtualHost()
 {
     $string = null;
     foreach ($this->main->__var_domlist as $v) {
         $string .= "\$HTTP[\"host\"] =~ \"^{$v}\" {\n";
         $string .= "server.document-root =  \"/usr/local/lxlabs/kloxo/httpdocs/webdisk/\"\n";
         $string .= "cgi.assign = ( \".php\" => \"/home/httpd/{$v}/davsuexec.sh\" )\n";
         $string .= $this->getDirprotectCore($v);
         $string .= "}\n\n\n";
         lxfile_mkdir("__path_httpd_root/{$v}/__davuser/");
         lxfile_touch("__path_httpd_root/{$v}/__davuser/davuser");
     }
     return $string;
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:14,代码来源:davuser__lighttpdlib.php

示例11: installapp_data_update

function installapp_data_update()
{
    print fill_string("Fetch current InstallApp version", 50);
    $string = file_get_contents("http://download.lxcenter.org/download/installapp/version.list");
    $rmt = unserialize($string);
    if (!$rmt) {
        throw new lxexception(" could_not_get_application_version_list", '', "");
    }
    print " OK ";
    $remver = $rmt->applist['installapp'];
    print "version is {$remver}\n";
    if (lxfile_exists("/home/kloxo/httpd/installappdata")) {
        print fill_string("Fetch local InstallApp version", 50);
        $loc = get_local_application_version_list();
        $locver = $loc->applist['installapp'];
        print " OK version is {$locver}\n";
        if ($remver != $locver) {
            print fill_string("New installapp found", 50);
            print " OK\n";
        }
    }
    print fill_string("Checking for old installappdata.zip", 50);
    if (lxfile_exists("/tmp/installappdata.zip")) {
        lxfile_rm("/tmp/installappdata.zip");
    }
    print " OK\n";
    print fill_string("Downloading InstallApp data...", 50);
    system("cd /tmp ; wget -q http://download.lxcenter.org/download/installapp/installappdata.zip");
    if (!lxfile_exists("/tmp/installappdata.zip")) {
        print " ERROR\n";
        print "Could not download data from LxCenter.\nAborted.\n\n";
        return;
    }
    print " OK\n";
    print fill_string("Remove old InstallApp data", 50);
    //      lxfile_rm_rec("__path_kloxo_httpd_root/installappdata");
    //      lxfile_mkdir("__path_kloxo_httpd_root/installappdata");
    lxfile_rm_rec("/home/kloxo/httpd/installappdata");
    lxfile_mkdir("/home/kloxo/httpd/installapp");
    lxfile_mkdir("/home/kloxo/httpd/installappdata");
    print " OK\n";
    print fill_string("Unpack new InstallApp data", 50);
    //      lxshell_unzip("lxlabs", "__path_kloxo_httpd_root/installappdata/", "/tmp/installappdata.zip");
    system("cd /home/kloxo/httpd/installappdata ; unzip -qq /tmp/installappdata.zip");
    print " OK\n";
    print fill_string("Remove downloaded InstallApp data zip file", 50);
    lxfile_rm("/tmp/installappdata.zip");
    print " OK\n";
}
开发者ID:soar-team,项目名称:kloxo,代码行数:49,代码来源:programlib.php

示例12: write

 function write()
 {
     lxfile_mkdir("__path_program_root/session");
     if ($this->isDeleted()) {
         lunlink("__path_program_root/session/{$this->nname}");
     } else {
         foreach ($this as $k => $v) {
             if (is_object($v)) {
                 continue;
             }
             $array[$k] = $v;
         }
         lfile_put_json_serialize("__path_program_root/session/{$this->nname}", $array);
     }
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:15,代码来源:ssession.php

示例13: create_main

function create_main()
{
    global $argc, $argv;
    global $gbl, $sgbl, $login, $ghtml;
    $opt = parse_opt($argv);
    lxfile_mkdir("{$sgbl->__path_program_etc}/conf");
    lxfile_mkdir("{$sgbl->__path_program_root}/pid");
    lxfile_mkdir("{$sgbl->__path_program_root}/log");
    lxfile_mkdir("{$sgbl->__path_httpd_root}");
    os_fix_lxlabs_permission();
    os_create_program_service();
    os_create_kloxo_service_once();
    if (isset($opt['admin-password'])) {
        $admin_pass = $opt['admin-password'];
    } else {
        $admin_pass = 'admin';
    }
    if ($opt['install-type'] == 'master') {
        create_mysql_db('master', $opt, $admin_pass);
        create_database();
        create_general();
        init_main($admin_pass);
        lxshell_return("__path_php_path", "../bin/collectquota.php");
        print "This will take a long time... Please wait...\n";
        system("/usr/local/lxlabs/ext/php/php ../bin/common/tmpupdatecleanup.php --type=master");
    } else {
        if ($opt['install-type'] == 'slave') {
            init_slave($admin_pass);
            print "This will take a long time... Please wait...\n";
            system("/usr/local/lxlabs/ext/php/php ../bin/common/tmpupdatecleanup.php --type=slave");
        } else {
            if ($opt['install-type'] == 'supernode') {
                $sgbl->__path_sql_file = $sgbl->__path_sql_file_supernode;
                $sgbl->__var_dbf = $sgbl->__path_supernode_db;
                $sgbl->__path_admin_pass = $sgbl->__path_super_pass;
                $sgbl->__var_admin_user = $sgbl->__var_super_user;
                create_mysql_db('super', $opt, $admin_pass);
                init_supernode($admin_pass);
                print "\n";
            } else {
                print "Unknown Install type\n";
                flush();
            }
        }
    }
    os_create_default_slave_driver_db();
    os_fix_some_permissions();
}
开发者ID:soar-team,项目名称:kloxo,代码行数:48,代码来源:create.php

示例14: dbactionAdd

 function dbactionAdd()
 {
     global $gbl, $sgbl, $login, $ghtml;
     $dir = $this->main->__var_full_directory;
     $dir = expand_real_root($dir);
     $pass = $this->main->realpass;
     if (!$pass) {
         $pass = randomString(8);
     }
     lxshell_input("{$pass}\n{$pass}\n", "pure-pw", "useradd", $this->main->nname, "-u", $this->main->__var_username, "-d", $dir, "-m");
     if (!lxfile_exists($dir)) {
         lxfile_mkdir($dir);
         lxfile_unix_chown($dir, $this->main->__var_username);
     }
     $this->setQuota();
     // If the user is added is fully formed, this makes sure that all his properties are synced.
     $this->toggleStatus();
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:18,代码来源:ftpuser__pureftplib.php

示例15: __xenimport_get_data

function __xenimport_get_data()
{
    lxfile_mkdir("/home/oldxenconfig-hypervm");
    $list = lscandir_without_dot("/etc/hypervm/");
    foreach ($list as $l) {
        if (!csb($l, "xm")) {
            continue;
        }
        if (csb($l, "xmexample")) {
            continue;
        }
        $vm[] = __xenimport_parse_config("/etc/xen/{$l}");
        //lxfile_mv("/etc/xen/$l", "/home/oldxenconfig-hypervm");
        lunlink("/etc/xen/auto/{$l}");
    }
    dprintr($vm);
    return $vm;
}
开发者ID:digideskio,项目名称:hypervm,代码行数:18,代码来源:xenimport__seflow.php


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