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


PHP pwCache::getPath方法代码示例

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


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

示例1: PwSpace

 function PwSpace($uid)
 {
     global $db, $winduid, $db_phopen, $db_dopen, $db_groups_open;
     $this->_db =& $db;
     $this->uid = $uid;
     $userService = L::loadClass('UserService', 'user');
     if ($winduid && $winduid == $uid) {
         $this->info = $GLOBALS['winddb'];
         $this->info['isMe'] = 1;
     } elseif ($userdb = $userService->get($this->uid, true, true, true)) {
         //$userdb['rvrc'] /= 10;
         $this->info = $userdb;
     }
     if ($this->info) {
         if (perf::checkMemcache()) {
             $_cacheService = Perf::gatherCache('pw_space');
             $space = $_cacheService->getSpaceByUid($this->uid);
         } else {
             $space = $this->_db->get_one("SELECT * FROM pw_space WHERE uid=" . S::sqlEscape($this->uid));
         }
         if ($space) {
             $this->info = array_merge($this->info, $space);
             if ($this->info['banner']) {
                 list($this->info['banner_s']) = geturl($this->info['banner'], 'lf');
             }
         } else {
             $this->default = true;
         }
         $spaceGroupid = $this->info['groupid'] == -1 ? $this->info['memberid'] : $this->info['groupid'];
         include pwCache::getPath(D_P . "data/groupdb/group_{$spaceGroupid}.php");
         $this->info['generalRight'] = $_G;
         !$this->info['name'] && ($this->info['name'] = $this->info['username'] . '的个人主页');
         !$this->info['skin'] && ($this->info['skin'] = 'default85');
         $GLOBALS['uskin'] =& $this->info['skin'];
     }
     if ($db_dopen) {
         $this->models[] = 'diary';
     }
     if ($db_phopen) {
         $this->models[] = 'photos';
     }
     if ($db_groups_open) {
         $this->models[] = 'colony';
     }
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:45,代码来源:space.class.php

示例2: uasort

        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);
    }
    $cachetime = get_date($cachetime + $per * 3600);
    require PrintEot('sort');
    footer();
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:sort.php


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