最近没有做捷易通项目了,今天的任务是给系统添加新闻栏目,当然涉及到编写文章了,所以到论坛看看,有一位朋友已经提供了kindEditor与xhEditor和ci的整合,稍微测试了一下两个编辑器,感觉kindeditor还是有好几个地方的错误,所以就决定使用xhEditor。不过有一个问题调试了好久,由于本身服务器apache采用dedecms提供的一键安装。但是它把上传的临时路径放到的系统默认路径之外,系统老提示错误。
Severity: Warning –> filesize() [<a href='function.filesize'>function.filesize</a>]: open_basedir restriction in effect. File(D:/DedeAMPZ/tmp/uploads/php3DC.tmp) is not within the allowed path(s): (D:/DedeAMPZ/WebRoot/Default) D:/DedeAMPZ/WebRoot/Default/bianji/system/application/controllers/welcome.php 71
ERROR – 2011-05-17 15:09:33 –> Severity: Warning –> rename() [<a href='function.rename'>function.rename</a>]: open_basedir restriction in effect. File(D:/DedeAMPZ/tmp/uploads/php3DC.tmp) is not within the allowed path(s): (D:/DedeAMPZ/WebRoot/Default) D:/DedeAMPZ/WebRoot/Default/bianji/system/application/controllers/welcome.php 93
ERROR – 2011-05-17 15:09:33 –> Severity: Warning –> chmod() [<a href='function.chmod'>function.chmod</a>]: Operation not permitted D:/DedeAMPZ/WebRoot/Default/bianji/system/application/controllers/welcome.php 94
所以老是提示错误,后来修改了临时路径为网站内部地址,就没有问题了。从后台上来看,还是有一个unlink的错误提示,原因是rename已经移动了该文件,然后又进行删除,所以会有一个警告错误,我对逻辑稍微修改了一下就没有问题了。
else{
$err=’上传文件扩展名必需为:’.$upext;
@unlink($temppath);
}
诶……,没有系统培训,差错都比较难,花了一个晚上5个小时才解决上传的问题,不知道编辑内容插入数据库以及从数据库读取内容来编辑,不知道有没有问题。明天再继续吧。上一张上传成功的截图:
本文来自:www.jieetong.net