A-A+

解决Thinkphp加入Ueditor后不能上传图片

2014年05月05日 PHP 暂无评论 阅读 2,436 views 次

在ThinkPHP中加入百度编辑器Ueditor不能上传图片,如下图:

ThinkPHP

解决方法看代码:


<script type="text/javascript">
window.UEDITOR_HOME_URL='__ROOT__/Data/Ueditor/';
window.onload=function(){
window.UEDITOR_CONFIG.initialFrameHeight=400;
window.UEDITOR_CONFIG.initialFrameWidth=800;
window.UEDITOR_CONFIG.savePath = ['Uploads'];  //多添加这么一行代码即可
window.UEDITOR_CONFIG.imageUrl="{:U(GROUP_NAME.'/Blog/upload')}";
window.UEDITOR_CONFIG.imagePath='__ROOT__/Uploads/';
UE.getEditor('content');
}
</script>
<js file="__ROOT__/Data/Ueditor/ueditor.config.js" />
<js file="__ROOT__/Data/Ueditor/ueditor.all.min.js" />

标签:

给我留言

Copyright © 严佳冬 保留所有权利.   Theme  Ality 百度地图 苏ICP备19045515号-2

用户登录

分享到: