多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC] ## 1、修改common.php 位置:\application\admin\common.php ~~~ function editor($fieldinfo){ //字段名 $field = $fieldinfo['field']; //反序列化设置项 $setting = unserialize($fieldinfo['setting']); //默认值 $value = $setting['defaultvalue']; //高度 $height = $setting['height']; $admin = config("view_replace_str.__ADMIN__"); $str = <<<EOF <script id="container" name="info[$field]" type="text/plain">$value</script> <script src="$admin/plugins/ueditor1_4_3_3/ueditor.config.js"></script> <script src="$admin/plugins/ueditor1_4_3_3/ueditor.all.js"></script> <script> var um = UE.getEditor('container',{ initialFrameHeight:$height, autoHeightEnabled:false, catchRemoteImageEnable:true }); </script> EOF; return $str; } ~~~ ## 2、修改插件图片保存路径 文件:static\admin\plugins\ueditor1_4_3_3\php\config.json ~~~ 将文件中的/Upload/{yyyy}{mm}{dd}/{time}{rand:6} 替换成 /uploads/{yyyy}{mm}{dd}/{time}{rand:6} ~~~ ## 3、PHP模板解析路径问题 ~~~ $admin = config("view_replace_str.__ADMIN__"); ~~~ 将__ADMIN__替换成$admin即可 ## 4、拓展阅读 [自定义图片上传路径](https://www.kancloud.cn/wayanbao/thinkphp/709580)