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


PHP updatecache_c函数代码示例

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


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

示例1: resetCloudWind

 function resetCloudWind()
 {
     $GLOBALS['db']->query("DELETE FROM `pw_config` WHERE db_name = 'db_yunsearch_search'");
     $GLOBALS['db']->query("DELETE FROM `pw_config` WHERE db_name = 'db_yunsearch_hook'");
     $GLOBALS['db']->query("DELETE FROM `pw_config` WHERE db_name = 'db_yunsearch_search'");
     $GLOBALS['db']->query("DELETE FROM `pw_config` WHERE db_name = 'db_yunsearch_domain'");
     $GLOBALS['db']->query("DELETE FROM `pw_config` WHERE db_name = 'db_yunsearch_isopen'");
     $GLOBALS['db']->query("DELETE FROM `pw_config` WHERE db_name = 'db_yunsearch_unique'");
     $GLOBALS['db']->query("DELETE FROM `pw_config` WHERE db_name = 'db_yundefend_shield'");
     $GLOBALS['db']->query("DELETE FROM `pw_config` WHERE db_name = 'db_yundefend_shielduser'");
     $GLOBALS['db']->query("DELETE FROM `pw_config` WHERE db_name = 'db_yundefend_shieldpost'");
     $GLOBALS['db']->query("DELETE FROM `pw_config` WHERE db_name = 'db_yun_model'");
     $GLOBALS['db']->query("DELETE FROM `pw_config` WHERE db_name = 'db_yun_expand'");
     $GLOBALS['db']->query("TRUNCATE TABLE `pw_log_aggregate`");
     $GLOBALS['db']->query("TRUNCATE TABLE `pw_log_attachs`");
     $GLOBALS['db']->query("TRUNCATE TABLE `pw_log_colonys`");
     $GLOBALS['db']->query("TRUNCATE TABLE `pw_log_diary`");
     $GLOBALS['db']->query("TRUNCATE TABLE `pw_log_forums`");
     $GLOBALS['db']->query("TRUNCATE TABLE `pw_log_members`");
     $GLOBALS['db']->query("TRUNCATE TABLE `pw_log_postdefend`");
     $GLOBALS['db']->query("TRUNCATE TABLE `pw_log_posts`");
     $GLOBALS['db']->query("TRUNCATE TABLE `pw_log_postverify`");
     $GLOBALS['db']->query("TRUNCATE TABLE `pw_log_setting`");
     $GLOBALS['db']->query("TRUNCATE TABLE `pw_log_threads`");
     $GLOBALS['db']->query("TRUNCATE TABLE `pw_log_userdefend`");
     $GLOBALS['db']->query("TRUNCATE TABLE `pw_log_weibos`");
     $GLOBALS['db']->query("TRUNCATE TABLE `pw_yun_setting`");
     P_unlink(D_P . 'data/bbscache/cloudwind_logsettings.php');
     P_unlink(D_P . 'data/bbscache/cloudwind_settings.php');
     P_unlink(D_P . 'data/bbscache/cloudwind_postinfo.php');
     require_once R_P . 'admin/cache.php';
     updatecache_c();
     return true;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:34,代码来源:platform.reset.class.php

示例2: updatesyncredit

 function updatesyncredit($syncredit)
 {
     require_once R_P . 'admin/cache.php';
     setConfig('uc_syncredit', $syncredit);
     updatecache_c();
     return new ApiResponse(1);
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:7,代码来源:class_Cache.php

示例3: setConfig

 function setConfig($key, $value)
 {
     if (!$key) {
         return true;
     }
     require_once R_P . 'admin/cache.php';
     setConfig('db_' . $key, $value);
     updatecache_c();
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:9,代码来源:platform.config.class.php

示例4: insertWebmasterKey

 /**
  * 插入站长中心id
  * @param int $siteId 站长中心id
  * @return bool
  */
 function insertWebmasterKey($siteId)
 {
     if ($siteId <= 0) {
         return new ApiResponse(false);
     }
     require_once R_P . 'admin/cache.php';
     setConfig('db_siteappkey', $siteId);
     updatecache_c();
     return new ApiResponse(true);
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:15,代码来源:class_Site.php

示例5: appsUpdateCache

 function appsUpdateCache($apps)
 {
     if ($apps && is_array($apps)) {
         require_once R_P . 'admin/cache.php';
         setConfig('db_apps_list', $apps);
         updatecache_c();
         return new ApiResponse(true);
     } else {
         return new ApiResponse(false);
     }
 }
开发者ID:noikiy,项目名称:ecmall,代码行数:11,代码来源:class_UserApp.php

示例6: _saveBindInfo

 function _saveBindInfo($options)
 {
     require_once R_P . 'admin/cache.php';
     global ${$this->_config_key};
     $bindInfo = ${$this->_config_key} ? ${$this->_config_key} : array();
     foreach ($options as $key => $value) {
         $bindInfo[$key] = $value;
     }
     ${$this->_config_key} = $bindInfo;
     setConfig($this->_config_key, $bindInfo);
     updatecache_c();
     return true;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:13,代码来源:weibositebindinfoservice.class.php

示例7: resetWind

 function resetWind()
 {
     $fields = array('db_yunsearch_search', 'db_yunsearch_hook', 'db_yun_hash', 'db_yunsearch_domain', 'db_yunsearch_isopen', 'db_yunsearch_unique', 'db_yundefend_shield', 'db_yundefend_shielduser', 'db_yundefend_shieldpost', 'db_yun_model', 'db_yun_expand');
     foreach ($fields as $field) {
         $GLOBALS['db']->query("DELETE FROM `pw_config` WHERE db_name = '{$field}'");
     }
     $tables = array('pw_log_aggregate', 'pw_log_attachs', 'pw_log_colonys', 'pw_log_diary', 'pw_log_forums', 'pw_log_members', 'pw_log_postdefend', 'pw_log_posts', 'pw_log_postverify', 'pw_log_setting', 'pw_log_threads', 'pw_log_userdefend', 'pw_log_weibos', 'pw_yun_setting');
     foreach ($tables as $table) {
         $result = $GLOBALS['db']->get_one("SHOW TABLES LIKE '{$table}'");
         if ($result) {
             $GLOBALS['db']->query("TRUNCATE TABLE `{$table}`");
         }
     }
     P_unlink(D_P . 'data/bbscache/cloudwind_logsettings.php');
     P_unlink(D_P . 'data/bbscache/cloudwind_settings.php');
     P_unlink(D_P . 'data/bbscache/cloudwind_postinfo.php');
     require_once R_P . 'admin/cache.php';
     updatecache_c();
     return true;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:20,代码来源:ver.core.reset.php

示例8: alertMusic

 function alertMusic($state)
 {
     //虾米音乐网编辑器开启/关闭
     require_once R_P . 'admin/cache.php';
     setConfig('db_xiami_music_open', $state);
     updatecache_c();
     return new ApiResponse(true);
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:8,代码来源:class_Other.php

示例9: addConfigPower

 function addConfigPower($powerData, $groupData)
 {
     setConfig('db_ratepower', serialize($powerData));
     setConfig('db_rategroup', serialize($groupData));
     updatecache_c();
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:6,代码来源:rate.class.php

示例10: setScanCache


//.........这里部分代码省略.........
    $forum = $catedb = $forumdb = $subdb1 = $subdb2 = $threaddb = array();
    # 获取版块列表
    $query = $db->query("SELECT fid,name,fup,type FROM pw_forums WHERE cms!='1' ORDER BY vieworder");
    while ($forums = $db->fetch_array($query)) {
        $forums['name'] = Quot_cv(strip_tags($forums['name']));
        if ($forums['type'] == 'category') {
            $catedb[] = $forums;
        } elseif ($forums['type'] == 'forum') {
            $forumdb[] = $forums;
        } elseif ($forums['type'] == 'sub') {
            $subdb1[] = $forums;
        } else {
            $subdb2[] = $forums;
        }
    }
    foreach ($catedb as $cate) {
        $threaddb[$cate['fid']] = array();
        foreach ($forumdb as $key2 => $forumss) {
            if ($forumss['fup'] == $cate['fid']) {
                if (!array_key_exists($forumss['fid'], $temp_threaddb[$cate['fid']])) {
                    # 读取版块帖子总数和表进度
                    $forumss['count'] = 0;
                    $forumss['progress'] = 0;
                    $forumss['result'] = 0;
                    $forumss['table_progress']['pw_threads'] = 0;
                    foreach ($postslist as $pw_posts) {
                        $forumss['table_progress'][$pw_posts] = 0;
                    }
                    $threaddb[$cate['fid']][$forumss['fid']] = $forumss;
                } else {
                    $threaddb[$cate['fid']][$forumss['fid']] = $temp_threaddb[$cate['fid']][$forumss['fid']];
                    unset($threaddb[$cate['fid']][$forumss['fid']]['table_progress']);
                    $threaddb[$cate['fid']][$forumss['fid']]['table_progress']['pw_threads'] = $temp_threaddb[$cate['fid']][$forumss['fid']]['table_progress']['pw_threads'];
                    foreach ($postslist as $pw_posts) {
                        $threaddb[$cate['fid']][$forumss['fid']]['table_progress'][$pw_posts] = $temp_threaddb[$cate['fid']][$forumss['fid']]['table_progress'][$pw_posts];
                    }
                }
                unset($forumdb[$key2]);
                foreach ($subdb1 as $key3 => $sub1) {
                    if ($sub1['fup'] == $forumss['fid']) {
                        if (!array_key_exists($sub1['fid'], $temp_threaddb[$cate['fid']])) {
                            # 读取版块帖子总数和表进度
                            $sub1['count'] = 0;
                            $sub1['progress'] = 0;
                            $sub1['result'] = 0;
                            $sub1['table_progress']['pw_threads'] = 0;
                            foreach ($postslist as $pw_posts) {
                                $sub1['table_progress'][$pw_posts] = 0;
                            }
                            $threaddb[$cate['fid']][$sub1['fid']] = $sub1;
                        } else {
                            $threaddb[$cate['fid']][$sub1['fid']] = $temp_threaddb[$cate['fid']][$sub1['fid']];
                            unset($threaddb[$cate['fid']][$sub1['fid']]['table_progress']);
                            $threaddb[$cate['fid']][$sub1['fid']]['table_progress']['pw_threads'] = $temp_threaddb[$cate['fid']][$sub1['fid']]['table_progress']['pw_threads'];
                            foreach ($postslist as $pw_posts) {
                                $threaddb[$cate['fid']][$sub1['fid']]['table_progress'][$pw_posts] = $temp_threaddb[$cate['fid']][$sub1['fid']]['table_progress'][$pw_posts];
                            }
                        }
                        unset($subdb1[$key3]);
                        foreach ($subdb2 as $key4 => $sub2) {
                            if ($sub2['fup'] == $sub1['fid']) {
                                if (!array_key_exists($sub2['fid'], $temp_threaddb[$cate['fid']])) {
                                    # 读取版块帖子总数和表进度
                                    $sub2['count'] = 0;
                                    $sub2['progress'] = 0;
                                    $sub2['result'] = 0;
                                    $sub2['table_progress']['pw_threads'] = 0;
                                    foreach ($postslist as $pw_posts) {
                                        $sub2['table_progress'][$pw_posts] = 0;
                                    }
                                    $threaddb[$cate['fid']][$sub2['fid']] = $sub2;
                                } else {
                                    $threaddb[$cate['fid']][$sub2['fid']] = $temp_threaddb[$cate['fid']][$sub2['fid']];
                                    unset($threaddb[$cate['fid']][$sub2['fid']]['table_progress']);
                                    $threaddb[$cate['fid']][$sub2['fid']]['table_progress']['pw_threads'] = $temp_threaddb[$cate['fid']][$sub2['fid']]['table_progress']['pw_threads'];
                                    foreach ($postslist as $pw_posts) {
                                        $threaddb[$cate['fid']][$sub2['fid']]['table_progress'][$pw_posts] = $temp_threaddb[$cate['fid']][$sub2['fid']]['table_progress'][$pw_posts];
                                    }
                                }
                                unset($subdb2[$key4]);
                            }
                        }
                    }
                }
            }
        }
    }
    $catedb = serialize($catedb);
    $threaddb = serialize($threaddb);
    # 写入文件
    $filecontent = "<?php\r\n";
    $filecontent .= "\$catedb=" . pw_var_export($catedb) . ";\r\n";
    $filecontent .= "\$threaddb=" . pw_var_export($threaddb) . ";\r\n";
    $filecontent .= "?>";
    $cahce_file = D_P . 'data/bbscache/wordsfb_progress.php';
    pwCache::setData($cahce_file, $filecontent);
    setConfig('db_wordsfb_cachetime', $timestamp);
    updatecache_c();
    return array('catedb' => $catedb, 'threaddb' => $threaddb);
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:101,代码来源:setbwd.php

示例11: _saveBindConfig

 /**
  * 
  * @param PW_WeiboSiteBindConfig $config
  */
 function _saveBindConfig($bindConfig)
 {
     require_once R_P . 'admin/cache.php';
     setConfig($this->_config_key, $bindConfig->toArray());
     updatecache_c();
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:10,代码来源:weibositebindservice.class.php

示例12: saveConfig

function saveConfig()
{
    global $db;
    $configdb = array();
    $temppre = array('config' => 'db_', 'ftp' => 'ftp_', 'reg' => 'rg_', 'mail' => 'ml_');
    foreach ($temppre as $key => $pre) {
        if (!isset($GLOBALS[$key])) {
            continue;
        }
        $key_a = $GLOBALS[$key];
        if (is_array($key_a)) {
            foreach ($key_a as $k => $value) {
                $var = $pre . $k;
                $vtype = 'string';
                if (is_array($value)) {
                    $vtype = 'array';
                    $value = serialize($value);
                }
                $configdb[$var] = array($var, $vtype, $value);
            }
        }
    }
    if (!empty($configdb)) {
        $names = array_keys($configdb);
        $query = $db->query('SELECT db_name,vtype,db_value FROM pw_config WHERE db_name IN (' . S::sqlImplode($names, false) . ')');
        while ($rt = $db->fetch_array($query)) {
            if (isset($configdb[$rt['db_name']])) {
                if ($rt['db_value'] != $configdb[$rt['db_name']]) {
                    $db->update("UPDATE pw_config SET " . S::sqlSingle(array('db_value' => $configdb[$rt['db_name']][2], 'vtype' => $configdb[$rt['db_name']][1])) . ' WHERE db_name=' . S::sqlEscape($rt['db_name']));
                }
                unset($configdb[$rt['db_name']]);
            }
        }
        $db->free_result($query);
        $pwSqlMulti = S::sqlMulti($configdb);
        $pwSqlMulti && $db->update('INSERT INTO pw_config (db_name,vtype,db_value) VALUES' . $pwSqlMulti);
        updatecache_c();
        return true;
    } else {
        return false;
    }
}
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:42,代码来源:cache.php

示例13: cache

 function cache()
 {
     $query = $this->db->query("SELECT * FROM pw_nav WHERE isshow=1 ORDER BY type,upid,view");
     $nav_cache = $nav_other = $nav_main = $nav_head = $nav_foot = array();
     while ($navdb = $this->db->fetch_array($query)) {
         list($navdb['color'], $navdb['b'], $navdb['i'], $navdb['u']) = explode('|', $navdb['style']);
         $key = $navdb['nkey'] ? 'KEY' . $navdb['nkey'] : 'ID' . $navdb['nid'];
         if ($navdb['type'] == "foot") {
             $nav_foot[$key] = array('html' => $this->_getHtmlText($navdb), 'pos' => $navdb['pos']);
         } elseif ($navdb['type'] == "head") {
             $nav_head[$key] = array('html' => $this->_getHtmlText($navdb), 'pos' => $navdb['pos']);
         } elseif ($navdb['type'] == "main") {
             $nav_main[$key] = array('html' => $this->_getHtmlText($navdb), 'pos' => $navdb['pos']);
         } else {
             $nav_other[$navdb['nid']] = $navdb;
         }
     }
     foreach ($nav_other as $value) {
         $key = $value['nkey'] ? 'KEY' . $value['nkey'] : 'ID' . $value['nid'];
         if (!$value['upid']) {
             $nav_cache[$value['type']][$key] = array('html' => $this->_getHtmlText($value));
         } else {
             $upkey = $nav_other[$value['upid']]['nkey'] ? 'KEY' . $nav_other[$value['upid']]['nkey'] : 'ID' . $nav_other[$value['upid']]['nid'];
             $nav_cache[$value['type']][$upkey]['child'][$key] = array('html' => $this->_getHtmlText($value));
         }
     }
     require_once R_P . 'admin/cache.php';
     setConfig('db_headnav', $nav_head);
     setConfig('db_footnav', $nav_foot);
     setConfig('db_mainnav', $nav_main);
     foreach ($nav_cache as $key => $value) {
         if (strpos($key, 'bbs_') !== false) {
             $key = str_replace('bbs_', 'db_', $key);
             setConfig($key, $value);
         } else {
             $this->db->update("REPLACE INTO pw_hack SET hk_name=" . pwEscape($key, false) . ",vtype='array',hk_value=" . pwEscape(serialize($value), false));
         }
     }
     foreach (array_keys($GLOBALS['db_modes']) as $value) {
         if ($value != 'bbs') {
             updatecache_conf($value, true);
         }
     }
     updatecache_c();
 }
开发者ID:adi00,项目名称:wumaproject,代码行数:45,代码来源:navmenu.class.php

示例14: updatecache_postcate

function updatecache_postcate()
{
    global $db;
    $postcatedb = array();
    $query = $db->query("SELECT pcid,name,ifable,vieworder,viewright,adminright FROM pw_postcate ORDER BY vieworder");
    $configdb = "<?php\r\n";
    while ($rt = $db->fetch_array($query)) {
        $postcatedb[$rt['pcid']] = $rt;
        $pcids[] = $rt['pcid'];
    }
    $configdb .= "\$postcatedb=" . pw_var_export($postcatedb) . ";\r\n";
    $configdb .= "?>";
    writeover(D_P . 'data/bbscache/postcate_config.php', $configdb);
    $pcids = implode(',', $pcids);
    setConfig('db_pcids', $pcids);
    updatecache_c();
}
开发者ID:adi00,项目名称:wumaproject,代码行数:17,代码来源:cache.php

示例15: _updateAreaUserConfig

 function _updateAreaUserConfig()
 {
     require_once R_P . 'admin/cache.php';
     $users = $this->getAllAreaUser();
     $temp = array();
     foreach ($users as $value) {
         $temp[] = $value['uid'];
     }
     setConfig('db_portal_admins', $temp);
     updatecache_c();
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:11,代码来源:arealevel.class.php


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