🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
* 默认上传(路径:/upfile/) ~~~ $other = []; $other['format'] = 'jpg/gif/png'; $back = $H_U->upload('上传标识',$other); ~~~ * 指定上传路径 ~~~ $other = []; $other['format'] = 'jpg/gif/png'; $other['path'] = '/upfile/diy(根目录开始)'; $back = $H_U->upload('上传标识',$other); ~~~ * 限定上传大小(K)与单次上传个数 ~~~ $other = []; $other['maxsize'] = '限制上传大小几k'; $other['maxfile'] = '单次上传最大个数'; $back = $H_U->upload('上传标识',$other); ~~~ * 自定义上传文件名 ~~~ $other = []; $other['filename'] = '自定义文件名'; $back = $H_U->upload('上传标识',$other); ~~~ * 启用缩略图(宽高默认200px) ~~~ $other = []; $other['slt_enable'] = '1'; $other['slt_width'] = '定义缩略图宽度'; $other['slt_height'] = '定义缩略图高度'; $back = $H_U->upload('上传标识',$other); ~~~ * 启用图片水印 ~~~ $other = []; $other['water_enable'] = '1'; $other['water_type'] = 'img'; $other['img_name'] = '图片水印名称(指向路径:/sbh/skin/water/)'; $other['img_post'] = '水印位置(0~9)'; $back = $H_U->upload('上传标识',$other); ~~~ * 启用文字水印 ~~~ $other = []; $other['water_enable'] = '1'; $other['water_type'] = 'text'; $other['text_font'] = '水印文字'; $other['text_color'] = '水印颜色(RGB)'; $other['text_ttf'] = '水印字体(指向路径:/sbh/skin/water/)'; $other['text_size'] = '字体大小'; $other['text_post'] = '水印位置(0~9)'; $back = $H_U->upload('上传标识',$other); ~~~ * 上传属性设置 ~~~ $other = []; $other['share'] = '是否启用共享(1是0否)'; $other['source'] = '上传来源(0后台1接口)'; $other['id'] = '关联所有者索引'; $other['user'] = '关联所有者用户名'; $back = $H_U->upload('上传标识',$other); ~~~ * 回调 ~~~ succeed 上传执行状态 msg 上传提示信息 sure 执行上传成功数组 err 执行上传失败数组 ~~~