EMLOG_LANGUAGE_DIR
EMLOG_LANGUAGE_DIR = 'ltr'
upload(string $fileName, string $errorNum, string $tmpFile, string $fileSize, array $type, boolean $isIcon = false, boolean $is_thumbnail = true) : array
文件上传
返回的数组索引 mime_type 文件类型 size 文件大小(单位KB) file_path 文件路径 width 宽度 height 高度 可选值(仅在上传文件是图片且系统开启缩略图时起作用) thum_file 缩略图的路径 thum_width 缩略图宽度 thum_height 缩略图高度 thum_size 缩略图大小(单位KB)
| string | $fileName | 文件名 |
| string | $errorNum | 错误码:$_FILES['error'] |
| string | $tmpFile | 上传后的临时文件 |
| string | $fileSize | 文件大小 KB |
| array | $type | 允许上传的文件类型 |
| boolean | $isIcon | 是否为上传头像 |
| boolean | $is_thumbnail | 是否生成缩略图 |
文件数据 索引
imageCropAndResize(string $src_image, string $dst_path, integer $dst_x, integer $dst_y, integer $src_x, integer $src_y, integer $dst_w, integer $dst_h, integer $src_w, integer $src_h)
裁剪、缩放图片
| string | $src_image | 原始图 |
| string | $dst_path | 裁剪后的图片保存路径 |
| integer | $dst_x | 新图坐标x |
| integer | $dst_y | 新图坐标y |
| integer | $src_x | 原图坐标x |
| integer | $src_y | 原图坐标y |
| integer | $dst_w | 新图宽度 |
| integer | $dst_h | 新图高度 |
| integer | $src_w | 原图宽度 |
| integer | $src_h | 原图高度 |