Upload.class.php 保存路径问题

浏览:781 发布日期:2014/11/05 分类:技术分享 关键字: 上传路径
188-194行            /* 检测并创建子目录 */
            $subpath = $this->getSubPath($file['name']);
            if(false === $subpath){
                continue;
            } else {
                $file['savepath'] = $this->savePath . $subpath;
            }
和393-399行        if ($this->autoSub && !empty($rule)) {
            $subpath = $this->getName($rule, $filename) . '/';
            if(!empty($subpath) && !$this->uploader->mkdir($this->savePath .'/'. $subpath)){
                $this->error = $this->uploader->getError();
                return false;
            }
        }
其中 $file['savepath'] = $this->savePath . $subpath;少了个 “/”
应该改为 $file['savepath'] = $this->savePath .'/'. $subpath;
最佳答案
评论( 相关
后面还有条评论,点击查看>>