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


PHP pwCache::setData方法代码示例

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


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

示例1: writeCache

 /**
  * @param $tag
  * @param $result
  * @return unknown_type
  */
 function writeCache($result)
 {
     $cache = '';
     $cache .= "<?php\r\n";
     $cache .= "\$_result=" . var_export($result, TRUE) . ";\r\n";
     $cache .= "?>\r\n";
     pwCache::setData($this->filepath, $cache);
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:13,代码来源:datanalysecache.class.php

示例2: findByTypeId

 function findByTypeId($typeId)
 {
     $data = array();
     if (file_exists($this->_getCacheKey())) {
         include S::escapePath($this->_getCacheKey());
     } else {
         $data = $this->findByTypeIdWithoutCache($typeId);
         pwCache::setData($this->_getCacheKey(), '<?php $data = ' . var_export($data, true) . ';');
     }
     return $data;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:11,代码来源:smiledb.class.php

示例3: updatecache_bg

function updatecache_bg()
{
    global $db;
    $query = $db->query("SELECT * FROM pw_hack WHERE hk_name LIKE 'bg_%'");
    $blogdb = "<?php\r\n";
    while (@extract($db->fetch_array($query))) {
        $hk_name = key_cv($hk_name);
        $blogdb .= "\${$hk_name}=" . pw_var_export($hk_value) . ";\r\n";
    }
    $blogdb .= "\n?>";
    pwCache::setData(D_P . 'data/bbscache/bg_config.php', $blogdb);
}
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:12,代码来源:admin.php

示例4: packHookFiles

 /**
  * 打包该钩子内的所有扩展文件
  * Enter description here ...
  */
 function packHookFiles()
 {
     $hookPack = L::loadClass('hookpack', 'hook');
     $temp = $hookPack->packHookFile($this->_hookName);
     if (!$temp) {
         return false;
     }
     $file = $hookPack->getPackedFile($this->_hookName);
     $classesBegin = get_declared_classes();
     require_once S::escapePath($file);
     $classesEnd = get_declared_classes();
     $difference = array_diff($classesEnd, $classesBegin);
     $temp = $this->_cookDifferenceClasses($difference);
     pwCache::setData($this->_getHookClassesCacheFile(), $temp, true);
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:19,代码来源:hook.class.php

示例5: generate

 function generate($rss_path)
 {
     /*modded for YunLiao 1.2: start*/
     /* original -- start*/
     /*
     $all = $this->rssHeader;
     $all .= $this->rssChannel;
     $all .= $this->rssImage;
     $all .= $this->rssItem;
     $all .= "</channel></rss>";
     */
     /* original -- end*/
     $all = $this->getRss();
     /*modded for YunLiao 1.2: end*/
     pwCache::setData($rss_path, $all);
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:16,代码来源:rss.class.php

示例6: 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

示例7: setFileCache

 /**
  * 设置文件缓存
  */
 function setFileCache()
 {
     if (!$this->_cache) {
         return;
     }
     $overPrintDao = $this->_getOverPrintDao();
     $overPrints = $overPrintDao->getAll();
     $tmp_overPrints = "\$overPrints=" . pw_var_export($overPrints) . ";";
     pwCache::setData($this->getCacheFileName(), "<?php\r\n" . $tmp_overPrints . "\r\n?>");
     return $overPrints;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:14,代码来源:overprint.class.php

示例8: arr_unique

         $mark = $sorttype[$step];
         $db->update("DELETE FROM pw_elements WHERE type='usersort' AND mark=" . S::sqlEscape($mark));
         $step++;
         $_usersort = $getinfo->userSort($mark, $db_sortnum, false);
         $_usersort = arr_unique($_usersort);
         if (is_array($_usersort) && count($_usersort) == $db_sortnum) {
             $tmpdate = end($_usersort);
             $usersort_judge[$mark] = $tmpdate['value'];
         } else {
             $usersort_judge[$mark] = 0;
         }
         if ($_usersort) {
             $sql = "REPLACE INTO pw_elements(id,value,addition,type,mark) VALUES" . S::sqlMulti($_usersort, false);
             $db->update($sql);
         }
         pwCache::setData(D_P . 'data/bbscache/usersort_judge.php', "<?php\r\n\$usersort_judge=" . pw_var_export($usersort_judge) . ";\r\n?>");
         adminmsg('updatecache_total_step', "{$basename}&action=update&type=usersort&step={$step}");
     }
 } elseif ($type == 'newsubject') {
     $step = intval(S::getGP('step'));
     //* require_once pwCache::getPath(D_P.'data/bbscache/forum_cache.php');
     pwCache::getData(D_P . 'data/bbscache/forum_cache.php');
     $arr_forumkeys = array_keys($forum);
     if (!$step) {
         $step = 0;
         $db->query("DELETE FROM pw_elements WHERE type='newsubject'");
     }
     $total = count($arr_forumkeys);
     for ($i = 0; $i < 5; $i++) {
         if ($step < $total) {
             $fourmid = $arr_forumkeys[$step];
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:aboutcache.php

示例9: list

     list($tabledb) = N_getTabledb();
     $sysinfo['pw_size'] = $sysinfo['o_size'] = 0;
     $query = $db->query('SHOW TABLE STATUS');
     while ($rt = $db->fetch_array($query)) {
         if (in_array($rt['Name'], $tabledb)) {
             $sysinfo['pw_size'] += $rt['Data_length'] + $rt['Index_length'] + 0;
         } else {
             $sysinfo['o_size'] += $rt['Data_length'] + $rt['Index_length'] + 0;
         }
     }
     $sysinfo['o_size'] = number_format($sysinfo['o_size'] / (1024 * 1024), 2);
     $sysinfo['pw_size'] = number_format($sysinfo['pw_size'] / (1024 * 1024), 2);
     $cachetext[1] = serialize($sysinfo);
     $cachetime = $timestamp + 60 * 60;
     /** writeover(D_P.'data/bbscache/admin_cache.php',"<?php die;?>{$cachetext[0]}\r\n$cachetime|{$cachetext[1]}"); **/
     pwCache::setData(D_P . 'data/bbscache/admin_cache.php', "<?php die;?>{$cachetext[0]}\r\n{$cachetime}|{$cachetext[1]}");
 } else {
     $sysinfo = unserialize($sysinfo);
 }
 $fids = array();
 foreach ($forum as $key => $value) {
     $fids[] = $key;
 }
 if ($fids) {
     $sql = "fid IN(" . S::sqlImplode($fids) . ")";
     $sysinfo['tcheck'] = $db->get_value("SELECT COUNT(*) FROM pw_threads WHERE {$sql} AND ifcheck='0'");
 } else {
     $sysinfo['tcheck'] = 0;
 }
 $sysinfo['pcheck'] = 0;
 if ($db_plist && count($db_plist) > 1) {
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:admininfo.php

示例10: threadscateGory

 function threadscateGory($classdb)
 {
     //生成帖子交换分类
     $classcache = "<?php\r\n\$info_class=array(\r\n";
     foreach ($classdb as $key => $class) {
         !$class['ifshow'] && ($class['ifshow'] = '0');
         $class['cid'] = (int) $class['cid'];
         $flag && $info_class[$class['cid']]['ifshow'] && ($class['ifshow'] = '1');
         $class['name'] = str_replace(array('"', "'"), array("&quot;", "&#39;"), $class['name']);
         $classcache .= "'{$class['cid']}'=>" . pw_var_export($class) . ",\r\n\r\n";
     }
     $classcache .= ");\r\n?>";
     pwCache::setData(D_P . "data/bbscache/info_class.php", $classcache);
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:14,代码来源:class_Other.php

示例11: setFileCache

 function setFileCache()
 {
     $jobDao = $this->_getJobDao();
     $jobs = $jobDao->getAll();
     $jobLists = "\$jobLists=" . pw_var_export($jobs) . ";";
     pwCache::setData($this->getCacheFileName(), "<?php\r\n" . $jobLists . "\r\n?>");
     return $jobs;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:8,代码来源:job.class.php

示例12: exit

<?php

!function_exists('readover') && exit('Forbidden');
global $db_picpath, $db_attachname;
$imgdt = $timestamp + $db_hour;
$attachdt = $imgdt + $db_hour * 100;
if (@rename($db_picpath, $imgdt) && @rename($db_attachname, $attachdt)) {
    require_once R_P . 'admin/cache.php';
    setConfig('db_picpath', $imgdt);
    setConfig('db_attachname', $attachdt);
    updatecache_c();
}
pwCache::setData(D_P . "data/bbscache/set_cache.php", "<?php die;?>|{$timestamp}");
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:13,代码来源:postconcle.php

示例13: _set_RateConfigCache

 function _set_RateConfigCache()
 {
     $rateConfigDB = $this->_getRateConfigDB();
     $configs = $rateConfigDB->gets();
     if (!$configs) {
         return null;
     }
     $tmp = array();
     foreach ($configs as $config) {
         $tmp[$config['typeid']][] = $config;
     }
     //写入缓存文件
     $result = serialize($tmp);
     pwCache::setData($this->_getReteConfigFilePath(), $result, false, 'w');
     return $result;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:16,代码来源:rate.class.php

示例14: array

     /* @var $register PW_Register */
     $userService->update($winduid, array('authmobile' => $authmobile));
     $userService->setUserStatus($winduid, PW_USERSTATUS_AUTHMOBILE, true);
     //颁发勋章
     if ($db_md_ifopen) {
         $medalService = L::loadClass('medalservice', 'medal');
         $medalService->awardMedalByIdentify($winduid, 'shimingrenzheng');
     }
 }
 //$iptime=$timestamp+86400;
 //Cookie("ifregip",$onlineip,$iptime);
 if ($rg_config['rg_allowsameip']) {
     if (file_exists(D_P . 'data/bbscache/ip_cache.php')) {
         pwCache::setData(D_P . 'data/bbscache/ip_cache.php', "<{$onlineip}>", false, "ab");
     } else {
         pwCache::setData(D_P . 'data/bbscache/ip_cache.php', "<?php die;?><{$timestamp}>\n<{$onlineip}>");
     }
 }
 //addonlinefile();
 if (GetCookie('userads') && $inv_linkopen && $inv_linktype == '1') {
     require_once R_P . 'require/userads.php';
 }
 if (GetCookie('o_invite') && $db_modes['o']['ifopen'] == 1) {
     list($o_u, $hash, $app) = explode("\t", GetCookie('o_invite'));
     if (is_numeric($o_u) && strlen($hash) == 18) {
         require_once R_P . 'require/o_invite.php';
     }
 }
 if ($rgyz == 1) {
     Cookie("winduser", StrCode($winduid . "\t" . PwdCode($windpwd) . "\t" . $safecv));
     Cookie("ck_info", $db_ckpath . "\t" . $db_ckdomain);
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:register.php

示例15: _get_RateConfigResultCache

 function _get_RateConfigResultCache($rateConfigs)
 {
     //每一个小时更新一次
     $filePath = $this->_getReteConfigFilePath($this->_typeId);
     if (!file_exists($filePath) || time() - filemtime($filePath) > 3600) {
         $weekHTML = $this->_buildWeekResultHtml($rateConfigs);
         pwCache::setData(s::escapePath($filePath), $weekHTML);
         //write ignore null or not
     } else {
         //* $weekHTML = readover ( $filePath );
         $weekHTML = pwCache::getData(S::escapePath($filePath), false, true);
     }
     return $weekHTML;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:14,代码来源:index.php


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