win环境 yii2 框架 overtrue/wechat 包 由 sys_get_temp_dir 引发的 the directory "c:\Windows" is not writable

时间:2016-08-03 13:20:51   收藏:0   阅读:1702

 

vendor\overtrue\wechat\src\Foundation\Application.php 

registerBase 方法 在初始化属性时

        $this[‘cache‘] = function () {
//            return new FilesystemCache(sys_get_temp_dir());  // win 下获取的是 c:\window 没有权限 位置太敏感 加权限什么的就算了吧
            return new FilesystemCache(\Yii::$app->cache->cachePath); // 用的是YII2 直接把第三方包的缓存放到站点的缓存文件夹
        };

 

原文:http://www.cnblogs.com/cgjcgs/p/5732287.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!