cetos下文件缓存目录创建权限不对,无法写入

浏览:877 发布日期:2012/11/06
3.0.0 - 严重 - 未处理
 private function init() {
        $stat = stat($this->options['temp']);
        $dir_perms = $stat['mode'] & 0007777; // Get the permission bits.
        $file_perms = $dir_perms & 0000666; // Remove execute bits for files.      
        // 创建项目缓存目录
        if (!is_dir($this->options['temp'])) {
            if (!  mkdir($this->options['temp']))
                return false;            
             chmod($this->options['temp'], $dir_perms);             
        }
    }
缓存目录不存在时,创建了$dir_perms=0 的目录,无法写入缓存文件
评论(
后面还有条评论,点击查看>>