<?php namespace HomeController; use ThinkController; class IndexController extends Controller { public function index() { // 初始化 S(array( 'type' => 'memcache', 'host' => 'localhost', 'post' => '11211' )); // 设置数据 S('username','jason',3600); // 获取数据 $data = S('username'); // 清空数据 S('username',null); } }