Вход Регистрация
Файл: _core/_class/cache_tkcat.php
Строк: 21
<?php

    
# mark core  v1.0
    # author Drk in
    # date 24.10.19 

    # class cache tkcat

    
class cache_tkcat {

        public static function 
get($ID# get
        
{
        
        
$file cache."_tkcat/{$ID}.data";    
        
$cache = @file_get_contents($file);     
        return 
unserialize($cache);

        }    

        public static function 
save($ID# save
        
{
        
        
$file cache."_tkcat/{$ID}.data";    
        
$cache DB :: $dbh -> queryFetch("SELECT * FROM tkcat WHERE id = ? LIMIT 1;", array($ID));        
        
$cache serialize($cache);    
        @
file_put_contents($file$cache);

        }

    
        public static function 
check($ID# check
        
{
        
        
$file cache."_tkcat/{$ID}.data";    
        if(!
file_exists($file)):      
        
self::save($ID);
        endif;
        return 
self::get($ID);

        }

        public static function 
ch($ID# check file
        
{
        
        
$file cache."_tkcat/{$ID}.data";    
        if(
file_exists($file)):  
        return 
true;
        else:    
        return 
false;
        endif;    

        }    

        


    }    
?>
Онлайн: 0
Реклама