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


PHP del函数代码示例

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


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

示例1: compile_statement

 function compile_statement($options)
 {
     $child = del($options, 'chainChild');
     $cond = $this->condition->compile($options, LEVEL_PAREN);
     $options['indent'] .= TAB;
     $body = $this->ensure_block($this->body)->compile($options);
     if ($body) {
         $body = "\n{$body}\n{$this->tab}";
     }
     $if_part = "if ({$cond}) {{$body}}";
     if (!$child) {
         $if_part = $this->tab . $if_part;
     }
     if (!$this->else_body) {
         return $if_part;
     }
     $ret = $if_part . ' else ';
     if ($this->is_chain()) {
         $options['indent'] = $this->tab;
         $options['chainChild'] = TRUE;
         $ret .= $this->else_body->unwrap()->compile($options, LEVEL_TOP);
     } else {
         $ret .= "{\n" . $this->else_body->compile($options, LEVEL_TOP) . "\n{$this->tab}}";
     }
     return $ret;
 }
开发者ID:TeigneuX,项目名称:php-websocket,代码行数:26,代码来源:if.php

示例2: compile_statement

 function compile_statement($options)
 {
     $child = del($options, 'chainChild');
     $exeq = del($options, 'isExistentialEquals');
     if ($exeq) {
         return yy('If', $this->condition->invert(), $this->else_body_node(), array('type' => 'if'))->compile($options);
     }
     $cond = $this->condition->compile($options, LEVEL_PAREN);
     $options['indent'] .= TAB;
     $body = $this->ensure_block($this->body);
     $if_part = "if ({$cond}) {\n" . $body->compile($options) . "\n{$this->tab}}";
     if (!$child) {
         $if_part = $this->tab . $if_part;
     }
     if (!$this->else_body) {
         return $if_part;
     }
     $ret = $if_part . ' else ';
     if ($this->is_chain()) {
         $options['indent'] = $this->tab;
         $options['chainChild'] = TRUE;
         $ret .= $this->else_body->unwrap()->compile($options, LEVEL_TOP);
     } else {
         $ret .= "{\n" . $this->else_body->compile($options, LEVEL_TOP) . "\n{$this->tab}}";
     }
     return $ret;
 }
开发者ID:NaszvadiG,项目名称:Base-CodeIgniter-App,代码行数:27,代码来源:If.php

示例3: copy_dhcps4

function copy_dhcps4($from, $to)
{
    set($to . "/start", query($from . "/start"));
    set($to . "/end", query($from . "/end"));
    set($to . "/domain", query($from . "/domain"));
    set($to . "/leasetime", query($from . "/leasetime"));
    set($to . "/router", query($from . "/router"));
    set($to . "/broadcast", query($from . "/broadcast"));
    //for netbios
    set($to . "/netbios/active", query($from . "/netbios/active"));
    set($to . "/netbios/learnfromwan", query($from . "/netbios/learnfromwan"));
    set($to . "/netbios/scope", query($from . "/netbios/scope"));
    set($to . "/netbios/ntype", query($from . "/netbios/ntype"));
    del($to . "/dns");
    del($to . "/wins");
    del($to . "/staticleases");
    $cnt = query($from . "/dns/count");
    set($to . "/dns/count", $cnt);
    if ($cnt > 0) {
        copy_entry($from . "/dns", $to . "/dns", $cnt);
    }
    $cnt = query($from . "/wins/count");
    set($to . "/wins/count", $cnt);
    if ($cnt > 0) {
        copy_entry($from . "/wins", $to . "/wins", $cnt);
    }
    mov($from . "/staticleases", $to);
}
开发者ID:jhbsz,项目名称:DIR-850L_A1,代码行数:28,代码来源:dhcpserver.php

示例4: setup_mdns

function setup_mdns($uid, $port, $srvname, $srvcfg)
{
    $dirty = 0;
    $stsp = XNODE_getpathbytarget("/runtime/services/mdnsresponder", "server", "uid", $uid, 0);
    if ($stsp == "") {
        if ($port != "0") {
            $dirty++;
            $stsp = XNODE_getpathbytarget("/runtime/services/mdnsresponder", "server", "uid", $uid, 1);
            set($stsp . "/srvname", $srvname);
            set($stsp . "/port", $port);
            set($stsp . "/srvcfg", $srvcfg);
        }
    } else {
        if ($port == "0") {
            $dirty++;
            del($stsp);
        } else {
            if (query($stsp . "/srvname") != $srvname) {
                $dirty++;
                set($stsp . "/srvname", $srvname);
            }
            if (query($stsp . "/port") != $port) {
                $dirty++;
                set($stsp . "/port", $port);
            }
            if (query($stsp . "/srvcfg") != $srvcfg) {
                $dirty++;
                set($stsp . "/srvcfg", $srvcfg);
            }
        }
    }
    return $dirty;
}
开发者ID:jhbsz,项目名称:DIR-850L_A1,代码行数:33,代码来源:mdnsresponder.php

示例5: exe_ouside_cmd

function exe_ouside_cmd($cmd)
{
    $ext_node = "/runtime/webaccess/ext_node";
    setattr($ext_node, "get", $cmd);
    get("x", $ext_node);
    del($ext_node);
}
开发者ID:jhbsz,项目名称:DIR-850L_A1,代码行数:7,代码来源:wfa_igd_handle.php

示例6: delAll

function delAll($delAll)
{
    $result = query($delAll);
    foreach ($result as $r) {
        del($r, false);
    }
    alert('删除成功');
}
开发者ID:laiello,项目名称:qinhan,代码行数:8,代码来源:index.php

示例7: set

function set($name, $value = false)
{
    \cf\session::open();
    if ($value) {
        \cf\session::set($name, $value);
    } else {
        del($name);
    }
}
开发者ID:sd-studio,项目名称:or,代码行数:9,代码来源:session.php

示例8: del

function del($dirname)
{
    if (!is_dir($dirname)) {
        return false;
    }
    foreach (glob($dirname . '/*') as $v) {
        is_dir($v) ? del($v) : unlink($v);
    }
    return rmdir($dirname);
}
开发者ID:symoo,项目名称:houdun,代码行数:10,代码来源:func.php

示例9: set

function set($uid, $ts)
{
    global $sched;
    del($uid);
    $sched[1][$uid] = $ts;
    if (!array_key_exists($ts, $sched[0])) {
        $sched[0][$ts] = array();
    }
    $sched[0][$ts][] = $uid;
}
开发者ID:BastinRobin,项目名称:CodeSprints,代码行数:10,代码来源:s.accepted.php

示例10: shift_entry

function shift_entry($total, $base)
{
    while ($total > 0) {
        $f_idx = $total - 1;
        $to_idx = $total;
        del($base . "entry:" . $to_idx . "/date");
        del($base . "entry:" . $to_idx . "/time");
        del($base . "entry:" . $to_idx . "/domain");
        movc($base . "entry:" . $f_idx, $base . "entry:" . $to_idx);
        $total = $total - 1;
    }
}
开发者ID:jhbsz,项目名称:DIR-850L_A1,代码行数:12,代码来源:dnslog.php

示例11: del

function del($parent)
{
    $result = mysql_query("select id from wp_structure where parent={$parent}");
    if (mysql_num_rows($result)) {
        while ($row = mysql_fetch_array($result)) {
            del($row['id']);
        }
    }
    //echo "delete from wp_structure where parent=$parent and id != 191063".'<br>';
    mysql_query("delete from wp_structure where parent={$parent}");
    mysql_query("delete from wp_structure where id={$parent}");
}
开发者ID:nukem,项目名称:WorkSound,代码行数:12,代码来源:delwp.php

示例12: del

function del($s)
{
    if (scandir($s)) {
        $var = scandir($s);
        for ($i = 2; $i < sizeof($var); $i++) {
            del($s . "/" . $var[$i]);
        }
        rmdir($s);
    } else {
        unlink($s);
    }
}
开发者ID:vooratarun,项目名称:sdcac,代码行数:12,代码来源:temp.php

示例13: del

function del($pid)
{
    $public_function = new public_function();
    $sql = "select * from blog_menu where menu_pid='{$pid}'";
    $delsql = "delete from blog_menu where menu_id='{$pid}'";
    $result = $public_function->getresult($sql);
    $num = $public_function->getnum($result);
    for ($i = 0; $i < $num; $i++) {
        $array = $public_function->getarray($result);
        del($array['menu_id']);
    }
    $result1 = $public_function->getresult($delsql);
    echo "<script>location.href='../add_new_menu.php?'</script>";
}
开发者ID:ZH9009,项目名称:jjczj,代码行数:14,代码来源:delcurrentmenu.php

示例14: edit

function edit($act_as_admin)
{
    global $del_x, $cancel, $sess, $ok_edit;
    if (isset($ok_edit)) {
        proceed($act_as_admin);
    } elseif (isset($cancel)) {
        cancel();
    } else {
        del($act_as_admin);
    }
    /*$sess->unregister("mytrail");
    $sess->unregister("action"); 
    $sess->unregister("thislink"); */
}
开发者ID:pilif,项目名称:linktrail,代码行数:14,代码来源:editlink.php

示例15: responseMsg

 public function responseMsg()
 {
     //get post data, May be due to the different environments
     $postStr = $GLOBALS["HTTP_RAW_POST_DATA"];
     //extract post data
     if (!empty($postStr)) {
         $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);
         $fromUsername = $postObj->FromUserName;
         $toUsername = $postObj->ToUserName;
         $keyword = trim($postObj->Content);
         $time = time();
         //查询网站内容,并赋值
         //初始化curl
         $ch = curl_init() or die(curl_error());
         //设置URL参数
         curl_setopt($ch, CURLOPT_URL, "http://122.226.139.162:9090/oa/cms/");
         //要求CURL返回数据
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
         //执行请求
         $result = curl_exec($ch) or die(curl_error());
         //取得返回的结果,并显示
         //echo $result;
         //echo curl_error($ch);
         //关闭CURL
         curl_close($ch);
         $pa = '%<div class="flow_top"*?>(.*?)<div class="flow_bottom">%si';
         preg_match_all($pa, $result, $match);
         $result = $match[1];
         $data = array();
         foreach ($result as $val) {
             $after = pregstring($val);
             $data .= $after . '    ';
         }
         //   $lastresult=del($data).$today;
         //   echo($data);
         $textTpl = "<xml> \n                            <ToUserName><![CDATA[%s]]></ToUserName> \n                            <FromUserName><![CDATA[%s]]></FromUserName> \n                            <CreateTime>%s</CreateTime> \n                            <MsgType><![CDATA[%s]]></MsgType> \n<Content><![CDATA[医院最新公告\n %s END]]></Content> \n                            <FuncFlag>0</FuncFlag> \n                            </xml>";
         if (!empty($postStr)) {
             $msgType = "text";
             $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, del($data));
             echo $resultStr;
         } else {
             echo "none";
         }
     } else {
         echo "none";
         exit;
     }
 }
开发者ID:sueflybaby,项目名称:learngit,代码行数:48,代码来源:get_gonggao.php


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