1234567891011121314151617181920 |
- <?php
- namespace app\controller;
- use app\BaseController;
- use think\facade\Cache;
- class Index extends BaseController
- {
- public function index()
- {
- echo phpinfo();exit;
- Cache::store('redis')->set("name","redis测试",3600);
- echo Cache::store('redis')->get("name");
- }
- public function hello($name = 'ThinkPHP6')
- {
- return 'hello,' . $name;
- }
- }
|