Task.php 727 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /*
  3. * To change this license header, choose License Headers in Project Properties.
  4. * To change this template file, choose Tools | Templates
  5. * and open the template in the editor.
  6. */
  7. namespace app\admin\controller;
  8. /**
  9. * Description of Task
  10. *
  11. * @author sgq
  12. */
  13. class Task {
  14. public function index() {
  15. $redis = new \think\cache\driver\Redis();
  16. $redis->set("test",1);
  17. exit();
  18. $redis = new \Redis();
  19. $redis->connect("127.0.0.1", 6379);
  20. $redis->auth("g2#&beauty.cn&#2g");
  21. var_dump($redis->hget("product",2301));
  22. }
  23. public function add() {
  24. }
  25. public function edit() {
  26. }
  27. public function delete() {
  28. }
  29. }