5.1.6版报错Serialization of 'Closure' is not allowed

浏览:3819 发布日期:2018/03/30 分类:求助交流
composer create-project topthink/think ./
全新安装的程序
在修改了app\index\Index.php文件
cache 开启了 redis<?php
namespace app\index\controller;
use think\Controller;
use think\facade\Cache;
class Index extends Controller
{
    public function index()
    {
       $name = Cache::remember('name',function(){
            return time();
        });

       echo $name;
       Cache::clear();

    }
}
然后就报错Serialization of 'Closure' is not allowed
最佳答案
评论( 相关
后面还有条评论,点击查看>>