代码修正,ot后台kindeditor编辑器图片上传错误.
addons\editorforadmin\controller\uploadcontroller.class.php/* 上传图片 */
public function upload(){
/* 上传配置 */
$setting = c('editor_upload');
/* 调用文件上传组件上传文件 */
$this->uploader = new upload($setting, 'local');
$info = $this->uploader->upload($_files);
return $info ? $info : false;
}
//keditor编辑器上传图片处理
public function ke_upimg(){
/* 返回标准数据 */
$return = array('error' => 0, 'info' => '上传成功', 'data' => '');
$img = $this->upload();
/* 记录附件信息 */
if($img){
$img = $img['imgfile'];
$return['url'] = $this->uploader->__get('rootpath').$img['savepath'].$img['savename'];
unset($return['info'], $return['data']);
} else {
$return['error'] = 1;
$return['message'] = $this->uploader->geterror();
}
/* 返回json数据 */
exit(json_encode($return));
}
ad:真正免费,域名+虚机+企业邮箱=0元