php下的ueditor的简单配置

来源:互联网 发布:p2p终结者软件下载 编辑:程序博客网 时间:2024/06/05 05:19

主要分为两个配置:

1. 配置URL

首先解压ueditor,在根目录下找到 ueditor.config.js ,打开,在里面配置URL。

假如,你的 网站(程序)目录为 myweb,即路径为 http://localhost/myweb,把ueditor放在myweb下的ueditor文件目录里,

所以,这里 URL= ‘myweb/ueditor’;

然后在前端页面引入:

ueditor/ueditor.config.js

ueditor/ueditor.all.min.js

ueditor/lang/zh-cn/zh-cn.js

这三个文件,即可


2. 配置图片上传路径

在 ueditor/php/config.json ,找到这个json配置文件,打开,

在里面,找到 imagePathFormat   选项,如:我在myweb/data/image 存放上传的图片,则这里 imagePathFormat : myweb/data/image/{yyyy}{mm}{dd}/{time}{rand:6}


简单的配置,就完成了。如果想要了解更多,可以去官网看api文档。

0 0