Nessuna descrizione

Index.php 394B

1234567891011121314151617181920
  1. <?php
  2. namespace app\controller;
  3. use app\BaseController;
  4. use think\facade\Cache;
  5. class Index extends BaseController
  6. {
  7. public function index()
  8. {
  9. echo phpinfo();exit;
  10. Cache::store('redis')->set("name","redis测试",3600);
  11. echo Cache::store('redis')->get("name");
  12. }
  13. public function hello($name = 'ThinkPHP6')
  14. {
  15. return 'hello,' . $name;
  16. }
  17. }