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


PHP pwCache::deleteData方法代码示例

本文整理汇总了PHP中pwCache::deleteData方法的典型用法代码示例。如果您正苦于以下问题:PHP pwCache::deleteData方法的具体用法?PHP pwCache::deleteData怎么用?PHP pwCache::deleteData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pwCache的用法示例。


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

示例1: fputin

                $nowfp = $offset / ($dbtdsize + 1);
                if ($node != 'NULL') {
                    fputin($fp, $node, $dbtdsize, $nowfp);
                }
                if ($node != $nowfp) {
                    fputin($fp, $nowfp, $dbtdsize, 'node', $node, Y);
                }
                /*添加数据*/
            }
            fclose($fp);
        }
    }
}
if ($yestime != $tdtime) {
    //* P_unlink($filename);
    pwCache::deleteData($filename);
    pwCache::setData($filename, str_pad("<?php die;?>\tNULL\t{$tdtime}\t", $dbtdsize) . "\n");
    /*24小时初始化一次*/
}
function fputin($fp, $offset, $dbtdsize, $prior = 'M', $next = 'M', $ifadd = 'N')
{
    $offset = $offset * ($dbtdsize + 1);
    /*将行数转换成指针偏移量*/
    fseek($fp, $offset, SEEK_SET);
    if ($ifadd == 'N') {
        $iddata = fread($fp, $dbtdsize);
        $idarray = explode("\t", $iddata);
        fseek($fp, $offset, SEEK_SET);
    }
    if ($next != 'M' && $prior != 'M') {
        /*说明这一数据是被更改的数据段.需要对其他辅助信息进行更改*/
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:today.php

示例2: updatecache_w

                    //更新缓存
                    updatecache_w();
                    //设置字典文件
                    setAllDictionary();
                    //重定向
                    $jumpurl = "{$basename}" . "&action=setting&importshow=1&success=" . $success . "&fail=" . $fail;
                    $show = <<<EOT
<script type="text/javascript">
\tlocation.href = "{$jumpurl}";
</script>
EOT;
                    echo $show;
                } else {
                    adminmsg('upload_error');
                }
                pwCache::deleteData($source);
            }
        } else {
            define('AJAX', 1);
            S::gp(array('class'));
            $class = (int) $class;
            $classdb = array();
            $sql = "SELECT * FROM pw_filter_class WHERE state=1";
            $query = $db->query($sql);
            while ($rt = $db->fetch_array($query)) {
                HtmlConvert($rt);
                $classdb[$rt['id']] = $rt;
            }
            $ajax_basename = EncodeUrl($basename . "&action=class&job=import");
            include_once PrintEot('filterAjax');
            ajax_footer();
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:setbwd.php

示例3: updateArticleHits

/**
 * 更新文章列表
 */
function updateArticleHits()
{
    global $hitsize, $hitfile, $db;
    if (file_exists($hitfile)) {
        if (!$hitsize) {
            $hitsize = @filesize($hitfile);
        }
        if ($hitsize < 10240) {
            $hitarray = explode("\t", readover($hitfile));
            $hits = array_count_values($hitarray);
            $count = 0;
            $hits_a = '';
            foreach ($hits as $key => $val) {
                $hits_a .= ",('{$key}','{$val}')";
                if (++$count > 300) {
                    break;
                }
            }
            if ($hits_a) {
                $hits_a = trim($hits_a, ', ');
                $db->query("CREATE TEMPORARY TABLE heap_hitupdate (article_id INT(10) UNSIGNED NOT NULL ,hits SMALLINT(6) UNSIGNED NOT NULL) TYPE = HEAP");
                $db->update("INSERT INTO heap_hitupdate (article_id,hits) VALUES {$hits_a}");
                $db->update("UPDATE pw_cms_articleextend as a, heap_hitupdate as h SET a.hits = a.hits+h.hits WHERE a.article_id=h.article_id");
                $db->query("DELETE FROM heap_hitupdate");
            }
            unset($hitarray, $hits, $hits_a);
        }
        pwCache::deleteData($hitfile);
    }
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:33,代码来源:core.php

示例4: delTopic


//.........这里部分代码省略.........
         $threads->delThreads($tids);
         */
         Perf::gatherInfo('changeThreadWithForumIds', array('fid' => array_keys($fids)));
         Perf::gatherInfo('changeThreadWithThreadIds', array('tid' => $tids));
         if ($modeldb) {
             $this->_RecycleModelTopic($modeldb);
         }
         if ($activityDb) {
             $this->_RecycleActivityTopic($activityDb);
         }
         if ($pcdb) {
             $this->_RecyclePcTopic($pcdb);
         }
     } else {
         //* $threadManager = L::loadClass("threadmanager", 'forum'); /* @var $threadManager PW_ThreadManager */
         $threadService = L::loadclass('threads', 'forum');
         foreach ($fids as $fid => $value) {
             //* $threadManager->deleteByThreadIds($fid, $value['tids']);
             $threadService->deleteByThreadIds($value['tids']);
             Perf::gatherInfo('changeThreadWithForumIds', array('fid' => $fid));
         }
         foreach ($ttable_a as $pw_tmsgs => $val) {
             //* $this->db->update("DELETE FROM $pw_tmsgs WHERE tid IN($deltids)");
             pwQuery::delete($pw_tmsgs, 'tid IN(:tid)', array($tids));
         }
         foreach ($ptable_a as $key => $val) {
             $pw_posts = GetPtable($key);
             //$this->db->update("DELETE FROM $pw_posts WHERE tid IN($deltids)");
             pwQuery::delete($pw_posts, 'tid IN(:tid)', array($tids));
         }
         if ($specialdb) {
             $this->_delSpecialTopic($specialdb);
         }
         if ($modeldb) {
             $this->_delModelTopic($modeldb);
         }
         if ($activityDb) {
             $this->_delActivityTopic($activityDb);
         }
         if ($pcdb) {
             $this->_delPcTopic($pcdb);
         }
         if ($robbuildTids) {
             $robbuildService = L::loadClass("robbuild", 'forum');
             $robbuildService->deleteByTids($robbuildTids);
         }
         if ($cydb) {
             $this->db->update("DELETE FROM pw_argument WHERE tid IN(" . S::sqlImplode($cydb) . ')');
         }
         delete_tag($deltids);
     }
     /* 删除微博 */
     $weiboService = L::loadClass('weibo', 'sns');
     /* @var $weiboService PW_Weibo */
     $weibos = $weiboService->getWeibosByObjectIdsAndType($tids, 'article');
     if ($weibos) {
         $mids = array();
         foreach ($weibos as $key => $weibo) {
             $mids[] = $weibo['mid'];
         }
         $weiboService->deleteWeibos($mids);
     }
     /* delete cache*/
     if ($db_ifpwcache ^ 1) {
         $db->update("DELETE FROM pw_elements WHERE type !='usersort' AND id IN(" . S::sqlImplode($tids) . ')');
     }
     //* P_unlink(D_P . 'data/bbscache/c_cache.php');
     pwCache::deleteData(D_P . 'data/bbscache/c_cache.php');
     /* 扣除积分 */
     $delCredit && $credit->runsql();
     //更新置顶帖表
     $this->db->update("DELETE FROM pw_poststopped WHERE tid IN ({$deltids}) AND pid = '0' AND fid != '0' ");
     if ($delutids) {
         $userCache = L::loadClass('Usercache', 'user');
         $userCache->delete(array_keys($delutids), array('article', 'cardtopic', 'weibo'));
     }
     $userService = L::loadClass('UserService', 'user');
     /* @var $userService PW_UserService */
     foreach ($deluids as $key => $value) {
         $userService->updateByIncrement($key, array(), array('postnum' => -$value));
     }
     $pw_attachs = L::loadDB('attachs', 'forum');
     if ($attachdb = $pw_attachs->getByTid($tids)) {
         delete_att($attachdb, !$recycle);
         require_once R_P . 'require/functions.php';
         pwFtpClose($GLOBALS['ftp']);
     }
     if ($updatetop) {
         if ($kmdTids) {
             $kmdService = L::loadClass('kmdservice', 'forum');
             foreach ($kmdTids as $tid) {
                 $kmdService->initThreadInfoByTid($tid);
             }
         }
         updatetop();
     }
     foreach ($fids as $fid => $value) {
         updateForumCount($fid, -$value['topic'], -$value['replies']);
     }
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:101,代码来源:delarticle.class.php

示例5: delforum

function delforum($fid)
{
    global $db, $db_guestdir, $db_guestthread, $db_guestread;
    $foruminfo = $db->get_one("SELECT fid,fup,forumadmin FROM pw_forums WHERE fid=" . S::sqlEscape($fid));
    //$db->update("DELETE FROM pw_forums WHERE fid=".S::sqlEscape($fid));
    pwQuery::delete('pw_forums', 'fid=:fid', array($fid));
    //* $db->update("DELETE FROM pw_forumdata WHERE fid=".S::sqlEscape($fid));
    pwQuery::delete('pw_forumdata', 'fid=:fid', array($fid));
    $db->update("DELETE FROM pw_forumsextra WHERE fid=" . S::sqlEscape($fid));
    $db->update("DELETE FROM pw_permission WHERE fid>'0' AND fid=" . S::sqlEscape($fid));
    if ($foruminfo['forumadmin']) {
        $userService = L::loadClass('UserService', 'user');
        /* @var $userService PW_UserService */
        $forumadmin = explode(",", $foruminfo['forumadmin']);
        foreach ($forumadmin as $key => $value) {
            if ($value) {
                $gid = $userService->getByUserName($value);
                if ($gid['groupid'] == 5 && !ifadmin($value)) {
                    $userService->update($gid['uid'], array('groupid' => -1));
                    admincheck($gid['uid'], $value, $gid['groupid'], '', 'delete');
                }
            }
        }
    }
    if ($db_guestthread || $db_guestread) {
        require_once R_P . 'require/guestfunc.php';
        $db_guestthread && deldir(D_P . "{$db_guestdir}/T_{$fid}");
    }
    //* P_unlink(D_P."data/forums/fid_{$fid}.php");
    pwCache::deleteData(D_P . "data/forums/fid_{$fid}.php");
    require_once R_P . 'require/functions.php';
    require_once R_P . 'require/updateforum.php';
    $pw_attachs = L::loadDB('attachs', 'forum');
    $ttable_a = $ptable_a = array();
    $query = $db->query("SELECT tid,replies,ptable FROM pw_threads WHERE fid=" . S::sqlEscape($fid));
    while ($tpc = $db->fetch_array($query)) {
        $tid = $tpc['tid'];
        $ttable_a[GetTtable($tid)][] = $tid;
        $ptable_a[$tpc['ptable']] = 1;
        $db_guestread && clearguestcache($tid, $tpc['replies']);
        if ($attachdb = $pw_attachs->getByTid($tid)) {
            delete_att($attachdb);
        }
    }
    pwFtpClose($GLOBALS['ftp']);
    foreach ($ttable_a as $pw_tmsgs => $val) {
        //* $val = S::sqlImplode($val,false);
        //* $db->update("DELETE FROM $pw_tmsgs WHERE tid IN($val)");
        pwQuery::delete($pw_tmsgs, 'tid IN(:tid)', array($val));
    }
    # $db->update("DELETE FROM pw_threads WHERE fid=".S::sqlEscape($fid));
    # ThreadManager
    //* $threadManager = L::loadClass("threadmanager", 'forum');
    //* $threadManager->deleteByForumId($fid);
    $threadService = L::loadclass('threads', 'forum');
    $threadService->deleteByForumId($fid);
    //* Perf::gatherInfo('changeThreadWithForumIds', array('fid'=>$fid));
    foreach ($ptable_a as $key => $val) {
        $pw_posts = GetPtable($key);
        //$db->update("DELETE FROM $pw_posts WHERE fid=".S::sqlEscape($fid));
        pwQuery::delete($pw_posts, 'fid=:fid', array($fid));
    }
    updateforum($foruminfo['fup']);
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:64,代码来源:setforum.php

示例6: _cleanCache

 function _cleanCache()
 {
     pwCache::deleteData($this->_getCacheKey());
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:4,代码来源:smiledb.class.php

示例7: _cleanCache

 function _cleanCache()
 {
     pwCache::deleteData($this->_getCacheFilePath());
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:4,代码来源:navconfigdb.class.php

示例8: elseif

    }
} elseif ($action == 'setting') {
    S::gp(array('mode', 'step'));
    $installfile = S::escapePath(R_P . 'mode/' . $mode . '/config/install.php');
    is_file($installfile) && (require_once $installfile);
} elseif ($action == 'fourmtypecache') {
    S::gp('m', null, '1');
    !array_key_exists($m, $db_modes) && adminmsg('mode_have_noopen');
    $fp = opendir(D_P . 'data/bbscache/');
    while ($filename = readdir($fp)) {
        if ($filename == '..' || $filename == '.') {
            continue;
        }
        if (strpos($filename, 'mode_' . $m) !== false) {
            //* P_unlink(S::escapePath(D_P.'data/bbscache/'.$filename));
            pwCache::deleteData(S::escapePath(D_P . 'data/bbscache/' . $filename));
        }
    }
    closedir($fp);
    $fp = opendir(D_P . 'data/tplcache/');
    while ($filename = readdir($fp)) {
        if ($filename == '..' || $filename == '.' || strpos($filename, '.htm') === false) {
            continue;
        }
        if (strpos($filename, $m . '_') === 0 || $m == 'area' && strpos($filename, 'portal_') === 0) {
            P_unlink(S::escapePath(D_P . 'data/tplcache/' . $filename));
        }
    }
    closedir($fp);
    $fp = opendir($attachdir . '/mini/');
    while ($filename = readdir($fp)) {
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:modeset.php

示例9: createForum

 function createForum($name, $fup = 0, $descrip = '', $linkurl = '')
 {
     //创建版块
     if (!$name) {
         return new ApiResponse(false);
     }
     //* @include_once pwCache::getPath(D_P.'data/bbscache/forum_cache.php');
     extract(pwCache::getData(D_P . 'data/bbscache/forum_cache.php', false));
     $forumtype = $forum[$fup]['type'] == 'category' ? 'forum' : ($forum[$fup]['type'] == 'forum' ? 'sub' : 'sub2');
     /*
     $this->db->update("INSERT INTO pw_forums SET " . S::sqlSingle(array(
     	'fup'			=> $fup,
     	'type'			=> $forumtype,
     	'name'			=> $name,
     	'descrip'		=> $descrip,
     	'cms'			=> 0,
     	'ifhide'		=> 1,
     	'allowtype'		=> 3
     )));
     */
     pwQuery::insert('pw_forums', array('fup' => $fup, 'type' => $forumtype, 'name' => $name, 'descrip' => $descrip, 'cms' => 0, 'ifhide' => 1, 'allowtype' => 3));
     $fid = $this->db->insert_id();
     $this->db->update("INSERT INTO pw_forumdata SET fid=" . S::sqlEscape($fid));
     $forumset = array('lock' => 0, 'cutnums' => 0, 'threadnum' => 0, 'readnum' => 0, 'newtime' => 0, 'orderway' => 'lastpost', 'asc' => 'DESC', 'allowencode' => 0, 'anonymous' => 0, 'rate' => 0, 'dig' => 0, 'inspect' => 0, 'watermark' => 0, 'commend' => 0, 'autocommend' => 0, 'commendlist' => '', 'commendnum' => 0, 'commendlength' => 0, 'commendtime' => 0, 'addtpctype' => 0, 'ifrelated' => 0, 'relatednums' => 0, 'relatedcon' => 'ownpost', 'relatedcustom' => array(), 'rvrcneed' => 0, 'moneyneed' => 0, 'creditneed' => 0, 'postnumneed' => 0, 'sellprice' => array(), 'uploadset' => 'money 0', 'rewarddb' => '', 'allowtime' => '');
     $forumset['link'] = $linkurl;
     $forumset = serialize($forumset);
     $this->db->update("INSERT INTO pw_forumsextra SET " . S::sqlSingle(array('fid' => $fid, 'forumset' => $forumset)));
     //* P_unlink(D_P.'data/bbscache/c_cache.php');
     pwCache::deleteData(D_P . 'data/bbscache/c_cache.php');
     require_once R_P . 'admin/cache.php';
     updatecache_f();
     require_once R_P . 'require/updateforum.php';
     $forumtype != 'category' && updatetop();
     return new ApiResponse($fid);
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:35,代码来源:class_Forum.php

示例10: USING

    if ($pwSendmail['by'] == 3) {
        $query = $db->query("SELECT m.uid,m.username,m.email FROM pw_members m left join pw_memberdata d USING(uid) {$pwSQL} {$limit}");
    } else {
        $query = $db->query("SELECT uid,username,email FROM pw_members " . $pwSQL . $limit);
    }
    while ($rt = $db->fetch_array($query)) {
        if (!$rt['email'] || !preg_match("/^[-a-zA-Z0-9_\\.]+@([0-9A-Za-z][0-9A-Za-z-]+\\.)+[A-Za-z]{2,5}\$/", $rt['email'])) {
            continue;
        }
        $sendsubject = str_replace(array('$winduid', '$windid', '$email'), array($rt['uid'], $rt['username'], $rt['email']), $pwSendmail['subject']);
        $sendcontent = str_replace(array('$winduid', '$windid', '$email'), array($rt['uid'], $rt['username'], $rt['email']), $pwSendmail['content']);
        sendemail($rt['email'], $sendsubject, $sendcontent, 'email_additional');
    }
    $pwSendmail['step']++;
    $havesend = $pwSendmail['sent'] = $pwSendmail['step'] * $pwSendmail['num'];
    $count = $pwSendmail['count'];
    if ($pwSendmail['count'] > $pwSendmail['sent']) {
        pwCache::setData($tmpCachefile, "<?php\r\ndie();\r\n?>\r\n" . serialize($pwSendmail));
        touch($tmpCachefile);
        $j_url = "{$basename}&action={$action}";
        adminmsg("sendmsg_step", EncodeUrl($j_url), 1);
    } else {
        pwCache::deleteData($tmpCachefile);
        $notExistUsers = $pwSendmail['notExistUsers'];
        !$pwSendmail['notExistUsers'] ? adminmsg('sendmsg_success') : adminmsg('sendmail_success_part');
    }
} elseif ($action == 'erase') {
    PostCheck($verify);
    pwCache::deleteData($tmpCachefile);
    adminmsg('operate_success');
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:sendmail.php

示例11: array

    }
    //$db->update("UPDATE pw_threads SET fid=".S::sqlEscape($tofid)."WHERE fid=".S::sqlEscape($fid));
    pwQuery::update('pw_threads', 'fid = :fid', array($fid), array('fid' => $tofid));
    $ptable_a = array('pw_posts');
    if ($db_plist && count($db_plist) > 1) {
        foreach ($db_plist as $key => $value) {
            if ($key == 0) {
                continue;
            }
            $ptable_a[] = 'pw_posts' . $key;
        }
    }
    foreach ($ptable_a as $val) {
        //$db->update("UPDATE $val SET fid=".S::sqlEscape($tofid)."WHERE fid=".S::sqlEscape($fid));
        pwQuery::update($val, 'fid=:fid', array($fid), array('fid' => $tofid));
    }
    $db->update("UPDATE pw_attachs SET fid=" . S::sqlEscape($tofid) . "WHERE fid=" . S::sqlEscape($fid));
    //* $db->update("DELETE FROM pw_forums WHERE fid=".S::sqlEscape($fid));
    pwQuery::delete('pw_forums', 'fid=:fid', array($fid));
    //* $db->update("DELETE FROM pw_forumdata WHERE fid=".S::sqlEscape($fid));
    pwQuery::delete('pw_forumdata', 'fid=:fid', array($fid));
    $db->update("DELETE FROM pw_forumsextra WHERE fid=" . S::sqlEscape($fid));
    //* P_unlink(D_P."data/forums/fid_{$fid}.php");
    pwCache::deleteData(D_P . "data/forums/fid_{$fid}.php");
    updatecache_f();
    updateforum($tofid);
    if ($forum['type'] == 'sub') {
        updateforum($forum['fup']);
    }
    adminmsg('operate_success');
}
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:uniteforum.php

示例12: delfcache

function delfcache($fid, $num)
{
    if ($num < 1) {
        return;
    }
    for ($i = 1; $i <= $num; $i++) {
        //* P_unlink(D_P."data/bbscache/fcache_{$fid}_{$i}.php");
        pwCache::deleteData(D_P . "data/bbscache/fcache_{$fid}_{$i}.php");
    }
}
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:10,代码来源:updateforum.php

示例13: uasort

        {
            global $type;
            return $a[$type] == $b[$type] ? 0 : ($a[$type] > $b[$type] ? -1 : 1);
        }
        uasort($admindb, "cmp");
        $sort_a[$type] = "class='link_down'";
    }
    require PrintEot('sort');
    footer();
} elseif ($action == 'delsort') {
    PostCheck();
    S::gp(array('month'));
    (!$month || !is_numeric($month) || $groupid != '3') && Showmsg('undefined_action');
    if (file_exists(D_P . 'data/bbscache/admin_sort_' . $month . '.php')) {
        //* P_unlink(D_P.'data/bbscache/admin_sort_'.$month.'.php');
        pwCache::deleteData(D_P . 'data/bbscache/admin_sort_' . $month . '.php');
    }
    refreshto("sort.php?action=admin", 'operate_success');
} elseif ($action == 'favor') {
    $cachetime = pwFilemtime(D_P . "data/bbscache/favor_sort.php");
    if (!$per || !file_exists(D_P . "data/bbscache/favor_sort.php") || $timestamp - $cachetime > $per * 3600) {
        $element = L::loadClass('element');
        $element->setDefaultNum(50);
        $_sort = array();
        $_SORTDB = $element->hotFavorsort();
        pwCache::writeover(D_P . 'data/bbscache/favor_sort.php', "<?php\r\n\$_FAVORS=" . pw_var_export($_SORTDB) . ";\r\n?>");
    } else {
        include pwCache::getPath(D_P . "data/bbscache/favor_sort.php");
        $_SORTDB = $_FAVORS;
        unset($_FAVORS);
    }
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:sort.php

示例14: array

        $weibos = $weiboService->getWeibosByObjectIdsAndType($selids, 'group_article');
        if ($weibos) {
            $mids = array();
            foreach ($weibos as $key => $weibo) {
                $mids[] = $weibo['mid'];
            }
            $weiboService->deleteWeibos($mids);
        }
        countPosts('-1');
        $credit->runsql();
        sendMawholeMessages($msgdb);
        if ($db_ifpwcache ^ 1) {
            $db->update("DELETE FROM pw_elements WHERE type !='usersort' AND id IN(" . S::sqlImplode($selids) . ')');
        }
        //* P_unlink(D_P.'data/bbscache/c_cache.php');
        pwCache::deleteData(D_P . 'data/bbscache/c_cache.php');
        if (!defined('AJAX')) {
            refreshto("apps.php?q=group&a=thread&cyid={$cyid}", 'deltopic_success');
        } else {
            Showmsg('deltopic_success_ajax');
        }
    }
}
function checkForHeadTopic($toptype, $fid, $selForums)
{
    require_once R_P . 'require/updateforum.php';
    list($catedbs, $top_1, $top_2, $top_3) = getForumListForHeadTopic($fid);
    $topAll = '';
    if ($toptype == 0) {
        return true;
    }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:m_topicadmin.php

示例15: adminmsg

        adminmsg('operate_success');
    } elseif ($action == 'delf') {
        $pwServer['REQUEST_METHOD'] != 'POST' && PostCheck($verify);
        S::gp(array('num'));
        S::gp(array('step'), 'GP', 2);
        !is_numeric($num) && ($num = 1000);
        $step = (int) $step;
        $isnum = 1;
        $path = D_P . 'data/bbscache';
        ++$step;
        $fp = opendir($path);
        while ($file = readdir($fp)) {
            if ($file != '' && !in_array($file, array('.', '..')) && preg_match('/^fcache\\_\\d+\\_\\d+\\.php$/i', $file)) {
                ++$isnum;
                //* P_unlink("$path/$file");
                pwCache::deleteData("{$path}/{$file}");
            }
            if ($isnum > $num) {
                break;
            }
        }
        closedir($fp);
        if ($isnum > $num) {
            $url = "{$basename}&action=delf&num={$num}&step={$step}";
            $delnum = $num * $step;
            adminmsg('fcache_delete', EncodeUrl($url), 2);
        }
        adminmsg('operate_success');
    }
}
//class & functions for updatecache
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:aboutcache.php


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