6.60 base cookie css daily record DISCUZ dota FORMHASH google Graphic Design HelloTxt iconfans iis7 JavaScript JQuery manyou mysql photoshop PHPCMS PlantsVsZombies regex seo twitter uch v1.0 vcar war3 web Wordpress wordpress plug wordpress相关信息 XML 互通 互通作弊 作品案例 作弊 动漫 原创 开心农场 排序 添加新标签 电脑相关 白菜僵尸房前交欢 程序开发 视频
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.
/**
* 读结果缓存文件
*
* @params string $cache_name
*
* @return array $data
*/
function read_static_cache($cache_name)
{
if ((DEBUG_MODE & 2) == 2)
{
return false;
}
static $result = array();
if (!empty($result[$cache_name]))
{
return $result[$cache_name];
}
$cache_file_path = ROOT_PATH . '/temp/static_caches/' . $cache_name . '.php';
if (file_exists($cache_file_path))
{
include_once($cache_file_path);
$result[$cache_name] = $data;
return $result[$cache_name];
}
else
{
return false;
}
}
/**
* 写结果缓存文件
*
* @params string $cache_name
* @params string $caches
*
* @return
*/
function write_static_cache($cache_name, $caches)
{
if ((DEBUG_MODE & 2) == 2)
{
return false;
}
$cache_file_path = ROOT_PATH . '/temp/static_caches/' . $cache_name . '.php';
$content = "<?php\r\n";
$content .= "\$data = " . var_export($caches, true) . ";\r\n";
$content .= "?>";
file_put_contents($cache_file_path, $content, LOCK_EX);
}
没有评论 »
还没有评论。
评论 RSS Feed。 TrackBack URL
发表评论