ueditor在linux中遇到的图片保存出错的问题

今天在linux服务器上集成ueditor遇到了一个问题,就是点击上传图片时图片保存出错,上网搜了好多也没有解决,今天无意中看到的解决方法。

1、首先是设置图片上传路径的文件夹权限,给根目录设置权限为777

2、修改ueditor\php目录下的Uploader.class.php文件,将报错的代码注释,改成$this->stateInfo = $dirname;

到此解决图片保存出错的问题。

 

//移动文件
        if (!(move_uploaded_file($file["tmp_name"], $this->filePath) && file_exists($this->filePath))) { //移动失败
           // $this->stateInfo = $this->getStateInfo("ERROR_FILE_MOVE");
		   $this->stateInfo = $dirname;
        } else { //移动成功
            $this->stateInfo = $this->stateMap[0];
        }


你可能感兴趣的:(ueditor在linux中遇到的图片保存出错的问题)