图片上传功能
上传,批量上传功能,PHP //相片批量处理 public function photosAll(){ //p($_FILES); import("ORG.Net.UploadFile"); $upload = new UploadFile(); //设置需要生成缩略图,仅对图像文件有效 $upload->thumb = true; //设置需要生成缩略图的文件后缀 $upload->thumbPrefix = 'm_,s_'; //生产2张缩略图 //设置缩略图最大宽度 $upload->thumbMaxWidth = '200,50'; //设置缩略图最大高度 $upload->thumbMaxHeight = '200,50'; $upload->maxSize = 33292200 ; //设置附件上传大小 $upload->autoSub = true; $upload->subType = 'date'; $upload->dateFormat = 'Ym'; $upload-&g t;allowExts = array('jpg', 'gif', 'png', 'jpeg'); //设置附件上传类型 $upload->thumbRemoveOrigin = false; //是否删除原图,相册会查看高清图所以原图不能删 $upload->savePath = './Upload/Photos/'; //设置附件上传目录 foreach ($_FILES as $key=>$file){ if(!empty($file['name'])) { $info = $upload->uploadOne($file); t;allowExts = array('jpg', 'gif', 'png', 'jpeg'); //设置附件上传类型 $upload->thumbRemoveOrigin = false; //是否删除原图,相册会查看高清图所以原图不能删 $upload->savePath = './Upload/Photos/'; //设置附件上传目录 foreach ($_FILES as $key=>$file){ if(!empty($file['name'])) { $info = $upload->uploadOne($file);
文件列表
类似qq上传功能.zip
(预估有个15文件)
类似qq上传功能
uploadsFile
core
uploadsFile.js
8KB
demo.js
2KB
control
images
delete_white.png
447B
bg.png
63KB
fileType
暂无评论