當前位置: 首頁>>代碼示例>>PHP>>正文


PHP updatecache函數代碼示例

本文整理匯總了PHP中updatecache函數的典型用法代碼示例。如果您正苦於以下問題:PHP updatecache函數的具體用法?PHP updatecache怎麽用?PHP updatecache使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了updatecache函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: registerCloud

 public function registerCloud($cloudApiIp = '')
 {
     try {
         $returnData = $this->register();
     } catch (Cloud_Service_Client_RestfulException $e) {
         if ($e->getCode() == 1 && $cloudApiIp) {
             $this->setCloudApiIp($cloudApiIp);
             try {
                 $returnData = $this->register();
                 C::t('common_setting')->update('cloud_api_ip', $cloudApiIp);
             } catch (Cloud_Service_Client_RestfulException $e) {
                 throw new Cloud_Service_Client_RestfulException($e);
             }
         } else {
             throw new Cloud_Service_Client_RestfulException($e);
         }
     }
     $sId = intval($returnData['sId']);
     $sKey = trim($returnData['sKey']);
     if ($sId && $sKey) {
         C::t('common_setting')->update_batch(array('my_siteid' => $sId, 'my_sitekey' => $sKey, 'cloud_status' => '2'));
         updatecache('setting');
     } else {
         throw new Cloud_Service_Client_RestfulException('Error Response.', 2);
     }
     return true;
 }
開發者ID:dalinhuang,項目名稱:healthshop,代碼行數:27,代碼來源:Cloud.php

示例2: onUserApplicationRemove

 public function onUserApplicationRemove($uId, $appIds)
 {
     $result = C::t('home_userapp')->delete_by_uid_appid($uId, $appIds);
     C::t('home_userappfield')->delete_by_uid_appid($uId, $appIds);
     updatecreditbyaction('installapp', $uId, array(), $appId, -1);
     require_once libfile('function/cache');
     updatecache('userapp');
     return $result;
 }
開發者ID:dalinhuang,項目名稱:healthshop,代碼行數:9,代碼來源:UserApplication.php

示例3: saveconfig

function saveconfig($cftype)
{
    global $mconfigs, $mconfigsnew, $db, $tblprefix;
    foreach ($mconfigsnew as $k => $v) {
        if (!isset($mconfigs[$k]) || $mconfigs[$k] != $v) {
            $db->query("REPLACE INTO {$tblprefix}mconfigs (varname,value,cftype) VALUES ('{$k}','{$v}','{$cftype}')");
        }
    }
    updatecache('mconfigs');
}
開發者ID:polarlight1989,項目名稱:08cms,代碼行數:10,代碼來源:backparams.inc.php

示例4: saveLoginConfigure

function saveLoginConfigure(array &$params)
{
    $pstr = BIGAPPJSON::encode($params);
    //$svalue = str_replace("\\u", "#u", $pstr);
    $sql = "INSERT INTO " . DB::table('common_setting') . " values ('bigapp_longin_register_setting','{$pstr}') " . "ON DUPLICATE KEY UPDATE svalue=values(svalue)";
    DB::query($sql);
    require_once libfile('function/core');
    require_once libfile('function/cache');
    updatecache('setting');
}
開發者ID:Mushan3420,項目名稱:BigApp-PHP7,代碼行數:10,代碼來源:appcfg.inc.php

示例5: _openCloud

 protected function _openCloud()
 {
     require_once libfile('function/cache');
     $result = C::t('common_setting')->update('cloud_status', 1);
     try {
         C::t('common_setting')->delete(array('connectsiteid', 'connectsitekey', 'my_siteid_old', 'my_sitekey_sign_old'));
     } catch (Exception $e) {
     }
     updatecache('setting');
     return true;
 }
開發者ID:MCHacker,項目名稱:discuz-docker,代碼行數:11,代碼來源:Cloud.php

示例6: generateUniqueId

 public function generateUniqueId()
 {
     $siteuniqueid = C::t('common_setting')->fetch('siteuniqueid');
     if (empty($siteuniqueid) || strlen($siteuniqueid) < 16) {
         $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz';
         $siteuniqueid = 'DX' . $chars[date('y') % 60] . $chars[date('n')] . $chars[date('j')] . $chars[date('G')] . $chars[date('i')] . $chars[date('s')] . substr(md5($_G['clientip'] . $_G['username'] . TIMESTAMP), 0, 4) . random(4);
         C::t('common_setting')->update('siteuniqueid', $siteuniqueid);
         require_once libfile('function/cache');
         updatecache('setting');
     }
 }
開發者ID:lemonstory,項目名稱:bbs,代碼行數:11,代碼來源:Util.php

示例7: cumonthadd_reset

 function cumonthadd_reset()
 {
     global $cu_nowmonth, $db, $tblprefix;
     if ($cu_nowmonth == date('n')) {
         return;
     }
     @set_time_limit(1000);
     @ignore_user_abort(TRUE);
     include_once M_ROOT . "./include/cache.fun.php";
     $db->query("UPDATE {$tblprefix}members SET cuaddmonth = '0'", 'SILENT');
     $db->query("REPLACE INTO {$tblprefix}mconfigs (varname,value,cftype) VALUES ('cu_nowmonth','" . date('n') . "','basic')", 'SILENT');
     updatecache('mconfigs');
 }
開發者ID:polarlight1989,項目名稱:08cms,代碼行數:13,代碼來源:userinfo.cls.php

示例8: delete_by_uid_orgid

 public function delete_by_uid_orgid($uids, $orgid, $wxupdate = 1)
 {
     $uids = (array) $uids;
     if ($return = DB::delete($this->_table, "uid IN (" . dimplode($uids) . ") and orgid='{$orgid}'")) {
         include_once libfile('function/cache');
         updatecache('organization');
         if ($wxupdate) {
             wx_updateUser($uids);
         }
         return $return;
     } else {
         return false;
     }
 }
開發者ID:druphliu,項目名稱:dzzoffice,代碼行數:14,代碼來源:table_organization_user.php

示例9: option_optimizer

 public function option_optimizer($options)
 {
     $update = array();
     foreach ($options as $option) {
         if (isset($this->setting[$option])) {
             $update[$option] = $this->setting[$option]['optimizedvalue'];
         }
     }
     if ($update) {
         C::t('common_setting')->update_batch($update);
         updatecache('setting');
     }
     return true;
 }
開發者ID:MCHacker,項目名稱:discuz-docker,代碼行數:14,代碼來源:optimizer_setting.php

示例10: cloudaddons_getuniqueid

function cloudaddons_getuniqueid() {
	global $_G;
	if (CLOUDADDONS_WEBSITE_URL == 'http://addon.discuz.com') {
		return $_G['setting']['siteuniqueid'] ? $_G['setting']['siteuniqueid'] : C::t('common_setting')->fetch('siteuniqueid');
	} else {
		if (!$_G['setting']['addon_uniqueid']) {
			$chars         = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz';
			$addonuniqueid = $chars[date('y') % 60] . $chars[date('n')] . $chars[date('j')] . $chars[date('G')] . $chars[date('i')] . $chars[date('s')] . substr(md5($_G['clientip'] . TIMESTAMP), 0, 4) . random(6);
			C::t('common_setting')->update('addon_uniqueid', $addonuniqueid);
			require_once libfile('function/cache');
			updatecache('setting');
		}
		return $_G['setting']['addon_uniqueid'];
	}
}
開發者ID:rxfu,項目名稱:dxbbs,代碼行數:15,代碼來源:function_cloudaddons.php

示例11: getPushStat

function getPushStat()
{
    global $_G;
    updatecache('setting');
    if (isset($_G['setting']['bigapp_push_config'])) {
        $_G['setting']['bigapp_push_config'] = unserialize($_G['setting']['bigapp_push_config']);
    }
    if (!isset($_G['setting']['bigapp_push_config']['push_enabled'])) {
        $_G['setting']['bigapp_push_config']['push_enabled'] = 0;
    }
    if ($_G['setting']['bigapp_push_config']['push_enabled'] != 0) {
        $_G['setting']['bigapp_push_config']['push_enabled'] = 1;
    }
    return $_G['setting']['bigapp_push_config']['push_enabled'];
}
開發者ID:Mushan3420,項目名稱:BigApp-PHP7,代碼行數:15,代碼來源:plugcfg.php

示例12: onCommonSetConfig

 public function onCommonSetConfig($data)
 {
     $settings = array();
     if (is_array($data) && $data) {
         foreach ($data as $key => $val) {
             if (substr($key, 0, 3) != 'my_') {
                 continue;
             }
             $settings[$key] = $val;
         }
         if ($settings) {
             C::t('common_setting')->update_batch($settings);
             require_once DISCUZ_ROOT . './source/function/function_cache.php';
             updatecache('setting');
             return true;
         }
     }
     return false;
 }
開發者ID:softhui,項目名稱:discuz,代碼行數:19,代碼來源:Common.php

示例13: readLocalAkSk2

 public static function readLocalAkSk2()
 {
     global $_G;
     require_once libfile('function/core');
     require_once libfile('function/cache');
     updatecache('setting');
     //$bigapp_aksk = 'bigapp_aksk_' . md5($_G['siteurl']);
     $bigapp_aksk = 'bigapp_aksk';
     //!< 不要把siteurl帶上,api接口和管理頁接口的siteurl是不同的!!!
     if (isset($_G['setting'][$bigapp_aksk]) && !is_array($_G['setting'][$bigapp_aksk])) {
         $_G['setting'][$bigapp_aksk] = unserialize($_G['setting'][$bigapp_aksk]);
     }
     if (isset($_G['setting'][$bigapp_aksk]['app_key']) && isset($_G['setting'][$bigapp_aksk]['app_secret'])) {
         runlog('bigapp', 'read local ak sk succ [ ak: ' . $_G['setting'][$bigapp_aksk]['app_key'] . ', sk: ' . $_G['setting'][$bigapp_aksk]['app_secret'] . ' ]');
         return $_G['setting'][$bigapp_aksk];
     }
     runlog('bigapp', 'read local ak sk failed');
     return false;
 }
開發者ID:Mushan3420,項目名稱:BigApp-PHP7,代碼行數:19,代碼來源:utils.inc.php

示例14: inittable

 private function inittable()
 {
     if (!DB::fetch_first("SHOW TABLES LIKE '" . DB::table('common_remote_port') . "'")) {
         $orig_tablepre = 'pre_';
         $tablepre = getglobal('config/db/1/tablepre');
         $dbcharset = getglobal('config/db/1/dbcharset');
         $porttable = "CREATE TABLE pre_common_remote_port (id mediumint(8) unsigned NOT NULL default '0' COMMENT '',idtype char(15) NOT NULL default '' COMMENT '',useip char(15) NOT NULL default '' COMMENT '',port smallint(6) unsigned NOT NULL default '0' COMMENT '',PRIMARY KEY (id, idtype)) ENGINE=MyISAM COMMENT=''";
         $porttable = str_replace("\r", "\n", str_replace(' ' . $orig_tablepre, ' ' . $tablepre, $porttable));
         $porttable = str_replace("\r", "\n", str_replace(' `' . $orig_tablepre, ' `' . $tablepre, $porttable));
         $type = strtoupper(preg_replace("/^\\s*CREATE TABLE\\s+.+\\s+\\(.+?\\).*(ENGINE|TYPE)\\s*=\\s*([a-z]+?).*\$/isU", "\\2", $porttable));
         $type = in_array($type, array('MYISAM', 'HEAP', 'MEMORY')) ? $type : 'MYISAM';
         $dbver = DB::$db->version();
         $porttable = preg_replace("/^\\s*(CREATE TABLE\\s+.+\\s+\\(.+?\\)).*\$/isU", "\\1", $porttable) . ($dbver > '4.1' ? " ENGINE={$type} DEFAULT CHARSET=" . $dbcharset : " TYPE={$type}");
         DB::query($porttable);
         C::t('common_setting')->update('porttable', 1);
         require_once libfile('function/cache');
         updatecache('setting');
         return true;
     }
 }
開發者ID:MCHacker,項目名稱:discuz-docker,代碼行數:20,代碼來源:table_common_remote_port.php

示例15: onUnionAddAdvs

 public function onUnionAddAdvs($advs)
 {
     $result = array();
     if (is_array($advs)) {
         foreach ($advs as $advid => $adv) {
             $data = $this->_addAdv($adv);
             if ($data === true) {
                 $result['succeed'][$advid] = $advid;
             } else {
                 $result['failed'][$advid] = $data;
             }
         }
         require_once libfile('function/cache');
         updatecache('advs');
         updatecache('setting');
     } else {
         $result['error'] = 'no adv';
     }
     return $result;
 }
開發者ID:lemonstory,項目名稱:bbs,代碼行數:20,代碼來源:Union.php


注:本文中的updatecache函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。