⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 memory.php

📁 一、修改产品详细页面的附件块 二、添加上浏览历史模块 三、在后台加入自定义首页、自定义页头、自定义页脚内容功能 四、在后台修改网站全局CSS样式文件功能 五、在后台修改每个模块的模板内容功能
💻 PHP
字号:
<?php/** * Swift Mailer Native memory runtime cache * Please read the LICENSE file * @author Chris Corbyn <chris@w3style.co.uk> * @package Swift_Cache * @license GNU Lesser General Public License */require_once dirname(__FILE__) . "/../ClassLoader.php";Swift_ClassLoader::load("Swift_Cache");/** * Caches data in variables - uses memory! * @package Swift_Cache * @author Chris Corbyn <chris@w3style.co.uk> */class Swift_Cache_Memory extends Swift_Cache{  /**   * The storage container for this cache   * @var array   */  protected $store = array();  /**   * The key which was last requested   * @var string   */  protected $requested;    /**   * Write data to the cache   * @param string The cache key   * @param string The data to write   */  public function write($key, $data)  {    if (!isset($this->store[$key])) $this->store[$key] = $data;    else $this->store[$key] .= $data;  }  /**   * Clear the cached data (unset)   * @param string The cache key   */  public function clear($key)  {    $this->store[$key] = null;    unset($this->store[$key]);  }  /**   * Check if data is cached for $key   * @param string The cache key   * @return boolean   */  public function has($key)  {    return array_key_exists($key, $this->store);  }  /**   * Read data from the cache for $key   * It makes no difference to memory/speed if data is read in chunks so arguments are ignored   * @param string The cache key   * @return string   */  public function read($key, $size=null)  {    if (!$this->has($key)) return false;        if ($this->requested == $key)    {      $this->requested = null;      return false;    }    $this->requested = $key;    return $this->store[$key];  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -