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


PHP csb函数代码示例

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


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

示例1: printProperty

function printProperty($class, $type)
{
    $r = new ReflectionClass($class);
    foreach ($r->getProperties() as $s) {
        if ($type === 'action') {
            $istr = "__acdesc_";
            if (!csb($s->name, "__acdesc_")) {
                continue;
            }
        }
        if ($type === 'property') {
            $istr = "__desc_";
            if (!csb($s->name, "__desc_")) {
                continue;
            }
        }
        $descr = get_classvar_description($class, $s->name);
        $name = strfrom($s->name, $istr);
        if (csa($descr[0], "q")) {
            continue;
        }
        if (cse($name, "_f")) {
            continue;
        }
        if (cse($name, "_l")) {
            continue;
        }
        if (cse($name, "_o")) {
            continue;
        }
        printf("%30s %s\n", $name, $descr['help']);
    }
}
开发者ID:digideskio,项目名称:hypervm,代码行数:33,代码来源:reflect.php

示例2: add

 static function add($parent, $class, $param)
 {
     if (!csb($param['nname'], "lvm:") && !csb($param['nname'], "/")) {
         throw new lxexception('location_is_either_full_path_or_lvm', 'nname', '');
     }
     return $param;
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:7,代码来源:dirlocationlib.php

示例3: process_main

function process_main()
{
    global $gbl, $sgbl, $login, $ghtml;
    global $argv;
    $list = parse_opt($argv);
    $exitchar = $sgbl->__var_exit_char;
    $res = new Remote();
    $res->exception = null;
    $res->ddata = "hello";
    $res->message = "hello";
    $total = file_get_contents($list['temp-input-file']);
    @lunlink($list['temp-input-file']);
    $string = explode("\n", $total);
    if (csb($total, "__file::")) {
        ob_end_clean();
        file_server(null, $total);
    } else {
        $reply = process_server_input($total);
        //fprint(unserialize(base64_decode($reply)));
        ob_end_clean();
        print "{$reply}\n{$exitchar}\n";
        flush();
    }
    exit;
}
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:25,代码来源:process_single.php

示例4: checkIfUserExists

 static function checkIfUserExists($name, $id)
 {
     if (posix_getpwnam($name)) {
         $username = $name;
         $list = lfile("/etc/passwd");
         $comment = null;
         foreach ($list as $l) {
             $l = trim($l);
             if (csb($l, "{$username}:")) {
                 $useri = explode(":", $l);
                 $comment = $useri[4];
                 break;
             }
         }
         //dprint($comment . "Hello\n");
         if ($comment === uuser::getUserDescription($id)) {
             log_error("User {$name} Already Exists. But is of the same domain");
             return true;
         } else {
             log_error("User {$name} Already Exists. But is of NOT of the same domain");
             throw new lxexception("User_Exist", 'web_s_uuser_nname', $name);
         }
     }
     return false;
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:25,代码来源:uuser__linuxlib.php

示例5: mail_parse

 static function mail_parse($file)
 {
     $fp = fopen($file, "r");
     $ret['header'] = null;
     $name = str_replace(",", "_s_coma_s_", $file);
     $name = str_replace(":", "_s_colon_s_", $name);
     $ret['nname'] = $name;
     while (!feof($fp)) {
         $l = fgets($fp);
         if ($l === "\n") {
             fclose($fp);
             break;
         }
         if (csb($l, "From:")) {
             $ret['from'] = strfrom($l, "From:");
         }
         if (csb($l, "Subject:")) {
             $ret['subject'] = strfrom($l, "Subject:");
         }
         if (csb($l, "Date:")) {
             $ret['date'] = strfrom($l, "Date:");
         }
         $ret['location'] = basename(dirname(dirname($file)));
         $ret['header'] .= $l;
     }
     if (!isset($ret['subject'])) {
         $ret['subject'] = '[no subject]';
     }
     return $ret;
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:30,代码来源:mailcontent__qmaillib.php

示例6: moveToClient

function moveToClient()
{
    global $gbl, $sgbl, $login, $ghtml;
    $login->loadAllObjects('ftpuser');
    $l = $login->getList('ftpuser');
    foreach ($l as $b) {
        if (csb($b->parent_clname, 'web-')) {
            list($parentclass, $parentname) = getParentNameAndClass($b->parent_clname);
            $d = new Domain(null, null, $parentname);
            $d->get();
            $b->parent_clname = $d->parent_clname;
            $w = $d->getObject('web');
            $b->directory = "{$w->docroot}/{$b->directory}";
            $b->directory = remove_extra_slash($b->directory);
            $b->setUpdateSubaction();
            $b->write();
        }
    }
    $login->loadAllObjects('mysqldb');
    $l = $login->getList('mysqldb');
    foreach ($l as $b) {
        if (csb($b->parent_clname, 'domain-')) {
            list($parentclass, $parentname) = getParentNameAndClass($b->parent_clname);
            $d = new Domain(null, null, $parentname);
            $d->get();
            $b->parent_clname = $d->parent_clname;
            $b->setUpdateSubaction();
            $b->write();
        }
    }
}
开发者ID:soar-team,项目名称:kloxo,代码行数:31,代码来源:fixmovetoclient.php

示例7: ConvertToMESMTPAddress

 static function ConvertToMESMTPAddress($MEAddress)
 {
     if (!csb($MEAddress, "[SMTP:")) {
         return "[SMTP:" . $MEAddress . "]";
     } else {
         return $MEAddress;
     }
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:8,代码来源:MailEnable.php

示例8: getVersion

 static function getVersion($list, $name)
 {
     foreach ($list as $v) {
         if (csb($v, $name) || csa($v, " {$name} ")) {
             $ret[] = $v;
         }
     }
     return implode(", ", $ret);
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:9,代码来源:component__rpmlib.php

示例9: check_if_skip

function check_if_skip($l)
{
    $vlist = array("server-id", "master-host", "master-user", "master-password");
    foreach ($vlist as $v) {
        if (csb($l, $v)) {
            return true;
        }
    }
    return false;
}
开发者ID:hypervm-ng,项目名称:hypervm-ng,代码行数:10,代码来源:setupsecondary.php

示例10: add

 static function add($parent, $class, $param)
 {
     $ttype = $param['ttype'];
     $redirect = $param['redirect'];
     if ($ttype == 'remote') {
         if (!csb($redirect, "http")) {
             $redirect = "http://" . $redirect;
         }
     }
     $param['redirect'] = $redirect;
     return $param;
 }
开发者ID:zseand,项目名称:kloxo,代码行数:12,代码来源:weblib.php

示例11: check_for_break

 static function check_for_break($root, $path)
 {
     if (lis_link($path)) {
         $rpath = lreadlink($path);
     } else {
         $rpath = $path;
     }
     dprint("{$rpath} {$root}\n");
     if (!csb($rpath, $root)) {
         throw new lxException("you_are_trying_to_go_outside_your_root", '', '');
     }
 }
开发者ID:digideskio,项目名称:hypervm,代码行数:12,代码来源:coreFfilelib.php

示例12: check_xen_dirlocation

 function check_xen_dirlocation()
 {
     $diro = getFirstFromList($this->main->__t_new_xen_location_a_list);
     $dirlocation = $diro->nname;
     if (!csb($dirlocation, "lvm:")) {
         return;
     }
     $dirlocation = fix_vgname($dirlocation);
     $ret = exec_with_all_closed_output("vgdisplay -c {$dirlocation}");
     if (!csa($ret, ":")) {
         throw new lxException("the_lvm_doesnt_exist", 'nname', $dirlocation);
     }
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:13,代码来源:dirlocation__linuxlib.php

示例13: get_local_application_version_list

function get_local_application_version_list()
{
    $list = allinstallapp__linux::getListofApps();
    $list = get_namelist_from_arraylist($list);
    foreach ($list as $k => $v) {
        if (csb($v, "__title")) {
            continue;
        }
        $info = allinstallapp::getAllInformation($v);
        $ret[$v] = $info['pversion'];
    }
    $loc = new Remote();
    $loc->applist = $ret;
    return $loc;
}
开发者ID:soar-team,项目名称:kloxo,代码行数:15,代码来源:programlib.php

示例14: readProcessList

 static function readProcessList()
 {
     $list = lscandir("/proc");
     foreach ($list as $pid) {
         if (is_numeric($pid) && $pid[0] != ".") {
             $cmdlinearr = lfile("/proc/" . $pid . "/cmdline");
             $return[$pid]['nname'] = $pid;
             if (!$cmdlinearr) {
                 unset($return[$pid]);
                 continue;
             }
             $cmdline = $cmdlinearr[0];
             $cmdline = preg_replace('+\\0+i', " ", $cmdline);
             $return[$pid]["command"] = substr($cmdline, 0, 100);
             if (csa($cmdline, "display.php") && csa($cmdline, "kloxo")) {
                 unset($return[$pid]);
                 continue;
             }
             $arr = lfile("/proc/" . $return[$pid]["nname"] . "/status");
             foreach ($arr as $a) {
                 if (csb($a, "State:")) {
                     $a = trim($a);
                     $a = strtil($a, "(");
                     $a = strfrom($a, "State:");
                     $a = trim($a);
                     $return[$pid]["state"] = $a;
                     $return[$pid]["state"] = $return[$pid]["state"] === "S" ? "ZZ" : $return[$pid]["state"];
                 }
                 if (csa($a, "Uid")) {
                     $uidarr = explode(":", $a);
                     $value = trimSpaces($uidarr[1]);
                     $uidarr2 = explode(" ", $value);
                     $uid = trim($uidarr2[1]);
                     $pwd = posix_getpwuid($uid);
                     $username = $pwd['name'];
                     $return[$pid]["username"] = $username;
                 }
                 if (csa($a, "VmSize")) {
                     $uidarr = explode(":", $a);
                     $uidarr = trimSpaces($uidarr[1]);
                     $uidarr = strtilfirst($uidarr, " ");
                     $return[$pid]['memory'] = round($uidarr / 1024, 2);
                 }
             }
         }
     }
     return $return;
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:48,代码来源:process__linuxlib.php

示例15: generateGraph

 static function generateGraph($oldtime, $newtime)
 {
     $convertedfile = self::convertfile($oldtime, $newtime);
     if (!$convertedfile) {
         return;
     }
     $list = lscandir("__path_mail_root/domains");
     foreach ($list as $l) {
         if (csb($l, "lists.")) {
             continue;
         }
         $total = self::getmail_usage($convertedfile, $l, $oldtime, $newtime);
         execRrdSingle("mailtraffic", "ABSOLUTE", $l, $total * 1024 * 1024);
     }
     lunlink($convertedfile);
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:16,代码来源:mailtrafficlib.php


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