dahua 2018-10-06 20:30:23 3355次浏览 1条评论 0 0 0

找了2个半小时 发现是 file_contentsoffset 在 7.1.0 以上支持了负值所以导致读取缓存失败!

yii/caching/cfileCache.php

protected function getValue($key)
{
    $cacheFile=$this->getCacheFile($key);
    if(($time=$this->filemtime($cacheFile))>time()) {
//            return @file_get_contents($cacheFile, false, null, $this->embedExpiry ? 10 : -1);
        return @file_get_contents($cacheFile, false, null, $this->embedExpiry ? 10 : 0);//php7.1以上增加了对负值的支持
    }elseif($time>0) {
        @unlink($cacheFile);
        return false;
    }
}
您需要登录后才可以评论。登录 | 立即注册