本文整理汇总了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';
}
}
示例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();
}