方法一:配置参数(推荐)
<link rel="stylesheet" href="kindeditor/themes/default/default.css" />
<script charset="utf-8" src="kindeditor/kindeditor-all.js"></script>
<script charset="utf-8" src="kindeditor/lang/zh-CN.js"></script>
<script>
KindEditor.ready(function(K) {
K.create('#content',{
imageSizeLimit : '10MB', //批量上传图片单张最大容量
imageUploadLimit : 100 //批量上传图片同时上传最多个数
});
});
</script>
<textarea id="content" name="content" style=" width: 99%; height: 500px; visibility: hidden; display: block; "></textarea>
方法二:修改框架kindeditor-all.js文件
imgPath = self.pluginsPath + 'multiimage/images/', //默认上传目录
imageSizeLimit = K.undef(self.imageSizeLimit, '1MB'), //默认上传单个文件大小
imageFileTypes = K.undef(self.imageFileTypes, '*.jpg;*.gif;*.png'), //默认上传类型
imageUploadLimit = K.undef(self.imageUploadLimit, 20), //默认一次性批量上传图片的个数
kindeditor/php/upload_json.php
//最大文件大小
$max_size = 1000000;
1. post_max_size = 50M ; Maximum size of POST data that PHP will accept.
4. upload_max_filesize = 50M ; Maximum allowed size for uploaded files.
post_max_size,upload_max_filesize都要设置
技巧:注意查看php错误日志
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。