本文整理汇总了PHP中pwCache::readover方法的典型用法代码示例。如果您正苦于以下问题:PHP pwCache::readover方法的具体用法?PHP pwCache::readover怎么用?PHP pwCache::readover使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pwCache
的用法示例。
在下文中一共展示了pwCache::readover方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _initFileModuleIds
function _initFileModuleIds($file, $name)
{
@chmod($file, 0777);
$fileString = pwCache::readover($file);
$moduleConfigService = L::loadClass('moduleconfigservice', 'area');
$newString = $moduleConfigService->cookModuleIds($fileString, $name);
pwCache::writeover($file, $newString);
}
示例2: getLayoutString
/**
* 获取布局html
*
* @param string $layout 布局名
* @return string
*/
function getLayoutString($layout)
{
if (!isset($this->layoutStrings[$layout])) {
if ($layout && file_exists(S::escapePath(A_P . 'data/layout/' . $layout . '/layout.htm'))) {
//* $this->layoutStrings[$layout] = readover(S::escapePath(A_P.'data/layout/'.$layout.'/layout.htm'));
$this->layoutStrings[$layout] = pwCache::readover(S::escapePath(A_P . 'data/layout/' . $layout . '/layout.htm'));
} else {
$this->layoutStrings[$layout] = '';
}
}
return $this->layoutStrings[$layout];
}
示例3: exit
!defined('P_W') && exit('Forbidden');
S::gp(array('subjectid', 'page', 'type'));
$u = "http://dm.phpwind.net/misc";
$subjectid = (int) $subjectid;
(!is_numeric($page) || $page < 1) && ($page = 1);
$s = '300.xml';
if ($type == 'general') {
$s = $subjectid ? $subjectid . '_' . $page . '.xml' : '300.xml';
} elseif ($type == 'magic') {
$s = $subjectid ? $subjectid . '_' . $page . '.xml' : '200.xml';
}
$cachefile = D_P . "data/bbscache/myshow_{$s}";
if (!file_exists($cachefile) || $timestamp - pwFilemtime($cachefile) > 43200) {
$data = '';
if ($subjectid) {
$url = "{$u}/list/{$s}?{$timestamp}";
} else {
$url = "{$u}/menu/{$s}?{$timestamp}";
}
require_once R_P . 'require/posthost.php';
$data = PostHost($url);
if ($data && strpos($data, '<?xml') !== false) {
//* writeover($cachefile, $data);
pwCache::writeover($cachefile, $data);
}
}
header("Content-Type: text/xml; charset=UTF-8");
$data = pwCache::readover($cachefile);
echo $data;
exit;
示例4: array
if (file_exists(R_P . "/hack/{$key}/index.php")) {
$installdb['index'][$key] = $value;
} else {
$installdb['noindex'][$key] = $value;
}
}
if ($fp = opendir(R_P . 'hack')) {
$infodb = array();
while ($hackdir = readdir($fp)) {
if (strpos($hackdir, '.') === false && empty($db_hackdb[$hackdir])) {
$hackname = $hackdir;
$hackopen = 0;
if (function_exists('file_get_contents')) {
$filedata = @file_get_contents(R_P . "hack/{$hackdir}/info.xml");
} else {
$filedata = pwCache::readover(R_P . "hack/{$hackdir}/info.xml");
}
if (preg_match('/\\<hackname\\>(.+?)\\<\\/hackname\\>\\s+\\<ifopen\\>(.+?)\\<\\/ifopen\\>/is', $filedata, $infodb)) {
$infodb[1] && ($hackname = S::escapeChar(str_replace(array("\n"), '', $infodb[1])));
$hackopen = (int) $infodb[2];
}
$hackurl = EncodeUrl("{$basename}&action=add&hackdir={$hackdir}&hackname=" . rawurlencode($hackname) . "&hackopen={$hackopen}");
$uninstalldb[] = array($hackname, $hackdir, $hackopen, $hackurl);
}
}
closedir($fp);
}
unset($db_hackdb);
include PrintEot('hackcenter');
exit;
} elseif ($action == 'edit') {
示例5: singleBakinData
function singleBakinData($index, $pre)
{
global $bakupDir;
if (!$index) {
return false;
}
$sql = array();
$tmpname = $bakupDir . $pre . '/';
$extend = file_exists($tmpname . 'table.zip') ? 'zip' : 'sql';
$data = explode(',', $index);
$filename = $tmpname . $data[0];
if ($extend == 'zip') {
L::loadClass('zip', 'utility', false);
$zipService = new Zip();
$filename = str_replace(substr($filename, strpos($filename, '.')), '.zip', $filename);
list($tmpData) = $zipService->extract($filename);
$tmpSql = explode("\n", $tmpData['data']);
} else {
$tmpData = pwCache::readover($filename);
$tmpSql = explode("\n", $tmpData);
}
$sql = $data[2] == -1 ? array_slice($tmpSql, $data[1]) : array_slice($tmpSql, $data[1], $data[2] - $data[1]);
return doBackIn($sql);
}
示例6: _getModulesFromTemplate
function _getModulesFromTemplate($templteFile)
{
$fileString = pwCache::readover($templteFile);
preg_match_all('/<pw.+?id=([\'|"]?)(.+?)(\\1).+?\\/>/i', $fileString, $reg);
return $reg[2];
}
示例7: array
$db->update("INSERT INTO pw_styles" . " SET " . S::sqlSingle(array('name' => $key, 'customname' => $customname[$key], 'ifopen' => $ifopen[$key], 'stylepath' => $stylepath, 'tplpath' => $tplpath, 'yeyestyle' => $yeyestyle, 'bgcolor' => $bgcolor, 'linkcolor' => $linkcolor, 'tablecolor' => $tablecolor, 'tdcolor' => $tdcolor, 'tablewidth' => $tablewidth, 'mtablewidth' => $mtablewidth, 'headcolor' => $headcolor, 'headborder' => $headborder, 'headfontone' => $headfontone, 'headfonttwo' => $headfonttwo, 'cbgcolor' => $cbgcolor, 'cbgborder' => $cbgborder, 'cbgfont' => $cbgfont, 'forumcolorone' => $forumcolorone, 'forumcolortwo' => $forumcolortwo, 'extcss' => $extcss)));
}
$ifopen[$key] == 1 && ($styledb[$key] = array($customname[$key], $ifopen[$key], $tplpath));
}
setConfig('db_styledb', $styledb);
setConfig('db_defaultstyle', $defaultstyle);
updatecache_c();
adminmsg('operate_success');
} elseif ($action == 'edit') {
S::gp(array('sid'));
if (!$_POST['step']) {
//* include_once S::escapePath(D_P."data/style/$sid.php");
extract(pwCache::getData(S::escapePath(D_P . "data/style/{$sid}.php"), false));
ifcheck($yeyestyle, 'yes');
$css_777 = pwWritable(D_P . "data/style/{$tplpath}_css.htm") ? 1 : 0;
$style_css = pwCache::readover(D_P . "data/style/{$tplpath}_css.htm");
$style_css = explode('<!--css-->', $style_css);
$style_css = str_replace('$', "\$", $style_css[1]);
include PrintEot('setstyles');
exit;
} else {
S::gp(array('setting'), 'P');
$basename .= "&action=edit&sid={$sid}";
strpos($setting[7], '%') === false && strpos(strtolower($setting[7]), 'px') === false && ($setting[7] .= 'px');
strpos($setting[8], '%') === false && strpos(strtolower($setting[8]), 'px') === false && ($setting[8] .= 'px');
$rs = $db->get_one("SELECT sid FROM pw_styles WHERE name=" . S::sqlEscape($sid, false));
if ($rs) {
$db->update("UPDATE pw_styles" . " SET " . S::sqlSingle(array('stylepath' => $setting[0], 'tplpath' => $setting[1], 'yeyestyle' => $setting[2], 'bgcolor' => $setting[3], 'linkcolor' => $setting[4], 'tablecolor' => $setting[5], 'tdcolor' => $setting[6], 'tablewidth' => $setting[7], 'mtablewidth' => $setting[8], 'headcolor' => $setting[9], 'headborder' => $setting[10], 'headfontone' => $setting[11], 'headfonttwo' => $setting[12], 'cbgcolor' => $setting[13], 'cbgborder' => $setting[14], 'cbgfont' => $setting[15], 'forumcolorone' => $setting[16], 'forumcolortwo' => $setting[17], 'extcss' => $setting[18])) . ' WHERE name=' . S::sqlEscape($sid));
} else {
$db->update("INSERT INTO pw_styles" . " SET " . S::sqlSingle(array('name' => $sid, 'ifopen' => '1', 'stylepath' => $setting[0], 'tplpath' => $setting[1], 'yeyestyle' => $setting[2], 'bgcolor' => $setting[3], 'linkcolor' => $setting[4], 'tablecolor' => $setting[5], 'tdcolor' => $setting[6], 'tablewidth' => $setting[7], 'mtablewidth' => $setting[8], 'headcolor' => $setting[9], 'headborder' => $setting[10], 'headfontone' => $setting[11], 'headfonttwo' => $setting[12], 'cbgcolor' => $setting[13], 'cbgborder' => $setting[14], 'cbgfont' => $setting[15], 'forumcolorone' => $setting[16], 'forumcolortwo' => $setting[17], 'extcss' => $setting[18])));
}
示例8: array
}
$uninstall[] = array($modename, $modedescrip, $modedir);
}
}
closedir($fp);
}
} elseif ($action == 'install') {
require_once R_P . 'require/sql_deal.php';
S::gp('mode', null, '1');
if ($mode && !array_key_exists($mode, $db_modes)) {
!file_exists(R_P . 'mode/' . $mode) && adminmsg('mode_no_directory');
!file_exists(R_P . 'mode/' . $mode . '/info.xml') && adminmsg('mode_no_info');
if (function_exists('file_get_contents')) {
$filedata = @file_get_contents(R_P . "mode/{$mode}/info.xml");
} else {
$filedata = pwCache::readover(R_P . "mode/{$mode}/info.xml");
}
$sqlarray = file_exists(R_P . "mode/{$mode}/sql.txt") ? FileArray($mode, 'mode') : array();
!empty($sqlarray) && SQLCreate($sqlarray, true);
$params = xml2array($filedata);
if (!$db_modes || !is_array($db_modes)) {
$db_modes = array();
}
$m_name = S::escapeChar($params['modename']);
$db_modes[$mode] = array('m_name' => $m_name, 'ifopen' => 1, 'title' => $m_name);
setConfig('db_modes', $db_modes);
//云统计获取房产、商家导航的安装时间
if (S::inArray($mode, array('house', 'dianpu'))) {
$stasticsService = L::loadClass('Statistics', 'datanalyse');
$mode == 'house' && $stasticsService->houseInstallTime();
$mode == 'dianpu' && $stasticsService->dianpuInstallTime();