mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-30 00:29:58 +09:00
설치시 optimized script.php 오류
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7461 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d2eecc54ec
commit
632da1c5f8
2 changed files with 32 additions and 22 deletions
35
classes/cache/CacheHandler.class.php
vendored
35
classes/cache/CacheHandler.class.php
vendored
|
|
@ -17,25 +17,26 @@
|
||||||
|
|
||||||
function CacheHandler($target, $info=null) {
|
function CacheHandler($target, $info=null) {
|
||||||
if(!$info) $info = Context::getDBInfo();
|
if(!$info) $info = Context::getDBInfo();
|
||||||
|
if($info){
|
||||||
if($target == 'object'){
|
if($target == 'object'){
|
||||||
if($info->use_template_cache =='apc') $type = 'apc';
|
if($info->use_template_cache =='apc') $type = 'apc';
|
||||||
else if(substr($info->use_template_cache,0,8)=='memcache'){
|
else if(substr($info->use_template_cache,0,8)=='memcache'){
|
||||||
$type = 'memcache';
|
$type = 'memcache';
|
||||||
$url = $info->use_template_cache;
|
$url = $info->use_template_cache;
|
||||||
|
}
|
||||||
|
}else if($target == 'template'){
|
||||||
|
if($info->use_template_cache =='apc') $type = 'apc';
|
||||||
|
else if(substr($info->use_template_cache,0,8)=='memcache'){
|
||||||
|
$type = 'memcache';
|
||||||
|
$url = $info->use_template_cache;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}else if($target == 'template'){
|
|
||||||
if($info->use_template_cache =='apc') $type = 'apc';
|
|
||||||
else if(substr($info->use_template_cache,0,8)=='memcache'){
|
|
||||||
$type = 'memcache';
|
|
||||||
$url = $info->use_template_cache;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if($type){
|
if($type){
|
||||||
$class = 'Cache' . ucfirst($type);
|
$class = 'Cache' . ucfirst($type);
|
||||||
include_once sprintf('%sclasses/cache/%s.class.php', _XE_PATH_, $class);
|
include_once sprintf('%sclasses/cache/%s.class.php', _XE_PATH_, $class);
|
||||||
$this->handler = call_user_func(array($class,'getInstance'), $url);
|
$this->handler = call_user_func(array($class,'getInstance'), $url);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,21 @@ define('_XE_PATH_', $XE_PATH);
|
||||||
define('__ZBXE__', true);
|
define('__ZBXE__', true);
|
||||||
define('__XE_LOADED_CLASS__', true);
|
define('__XE_LOADED_CLASS__', true);
|
||||||
include _XE_PATH_ . 'config/config.inc.php';
|
include _XE_PATH_ . 'config/config.inc.php';
|
||||||
include _XE_PATH_ . 'files/config/db.config.php';
|
|
||||||
include _XE_PATH_ . 'classes/handler/Handler.class.php';
|
|
||||||
include _XE_PATH_ . 'classes/cache/CacheHandler.class.php';
|
|
||||||
|
|
||||||
$oCacheHandler = new CacheHandler('template', $db_info);
|
$dbconfig_file =_XE_PATH_ . 'files/config/db.config.php';
|
||||||
$cache_support = $oCacheHandler->isSupport();
|
if(file_exists($dbconfig_file)){
|
||||||
|
include $dbconfig_file;
|
||||||
|
if($db_info && $db_info->use_template_cache){
|
||||||
|
include _XE_PATH_ . 'classes/handler/Handler.class.php';
|
||||||
|
include _XE_PATH_ . 'classes/cache/CacheHandler.class.php';
|
||||||
|
$oCacheHandler = new CacheHandler('template', $db_info);
|
||||||
|
$cache_support = $oCacheHandler->isSupport();
|
||||||
|
}else{
|
||||||
|
$cache_support = false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$cache_support = false;
|
||||||
|
}
|
||||||
|
|
||||||
$XE_WEB_PATH = substr($XE_PATH,strlen($_SERVER['DOCUMENT_ROOT']));
|
$XE_WEB_PATH = substr($XE_PATH,strlen($_SERVER['DOCUMENT_ROOT']));
|
||||||
if(substr($XE_WEB_PATH,-1) != "/") $XE_WEB_PATH .= "/";
|
if(substr($XE_WEB_PATH,-1) != "/") $XE_WEB_PATH .= "/";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue