vendor_user/uc_client/model/cache.php

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php

/*
    [UCenter] (C)2001-2099 Comsenz Inc.
    This is NOT a freeware, use is subject to license terms

    $Id: cache.php 1059 2011-03-01 07:25:09Z monkey $
*/

!defined('IN_UC') && exit('Access Denied');

if (!function_exists('file_put_contents')) {
    function file_put_contents($filename, $s)
    {
        $fp = @fopen($filename, 'w');
        @fwrite($fp, $s);
        @fclose($fp);
    }
}

class cachemodel
{
    public $db;
    public $base;
    public $map;

    public function __construct(&$base)
    {
        $this->cachemodel($base);
    }

    public function cachemodel(&$base)
    {
        $this->base = $base;
        $this->db = $base->db;
        $this->map = array(
            'settings' => array('settings'),
            'badwords' => array('badwords'),
            'apps' => array('apps'),
        );
    }

    //public
    public function updatedata($cachefile = '')
    {
        if ($cachefile) {
            foreach ((array) $this->map[$cachefile] as $modules) {
                $s = "<?php\r\n";
                foreach ((array) $modules as $m) {
                    $method = "_get_$m";
                    $s .= '$_CACHE[\''.$m.'\'] = '.var_export($this->$method(), true).";\r\n";
                }
                $s .= "\r\n?>";
                @file_put_contents(UC_DATADIR."./cache/$cachefile.php", $s);
            }
        } else {
            foreach ((array) $this->map as $file => $modules) {
                $s = "<?php\r\n";
                foreach ($modules as $m) {
                    $method = "_get_$m";

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。