




全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
M4U BLOG - body,tdfont-family:tahoma,verdana,arial;font-size:11px;line-height:15px;background-color:white;color:#666666;margin-left:20px;strongfont-size:12px;ainkcolor:#0066CC;a:hovercolor:#FF6600;aisitedcolor:#003366;a:activecolor:#9DCC00;table.itabletd.irowsheight:20px;background:url(index.php?i=dots repeat-x bottom上传文件: 允许上传的文件类型为:jpg|jpeg|png|pjpeg|gif|bmp|x-png|swf 返回?phpif ($_SERVERREQUEST_METHOD = POST)if (!is_uploaded_file($_FILESupfiletmp_name)/是否存在文件echo 文件不存在!;exit;$file = $_FILESupfile;if($max_file_size $filesize)/检查文件大小echo 文件太大!;exit;if(!in_array($filetype, $uptypes)/检查文件类型echo 只能上传图像文件或Flash!;exit;if(!file_exists($destination_folder)mkdir($destination_folder);$filename=$filetmp_name;$image_size = getimagesize($filename);$pinfo=pathinfo($filename);$ftype=$pinfoextension;$destination = $destination_folder.time().$ftype;if (file_exists($destination) & $overwrite != true)echo 同名文件已经存在了!;exit;if(!move_uploaded_file ($filename, $destination)echo 移动文件出错!;exit;$pinfo=pathinfo($destination);$fname=$pinfobasename;echo 已经成功上传文件名: .$destination_folder.$fname.;echo 宽度:.$image_size0;echo 长度:.$image_size1;if($watermark=1)$iinfo=getimagesize($destination,$iinfo);$nimage=imagecreatetruecolor($image_size0,$image_size1);$white=imagecolorallocate($nimage,255,255,255);$black=imagecolorallocate($nimage,0,0,0);$red=imagecolorallocate($nimage,255,0,0);imagefill($nimage,0,0,$white);switch ($iinfo2)case 1:$simage =imagecreatefromgif($destination);break;case 2:$simage =imagecreatefromjpeg($destination);break;case 3:$simage =imagecreatefrompng($destination);break;case 6:$simage =imagecreatefromwbmp($destination);break;default:die(不能上传此类型文件!);exit;imagecopy($nimage,$simage,0,0,0,0,$image_size0,$image_size1);imagefilledrectangle($nimage,1,$image_size1-15,80,$image_size1,$white);switch($watertype)case 1: /加水印字符串imagestring($nimage,2,3,$image_size1-15,$waterstring,$black);break;case 2: /加水印图片$simage1 =imagecreatefromgif(xplore.gif);imagecopy($nimage,$simage1,0,0,0,0,85,15);imagedestroy($simage1);break;switch ($iinfo2)case 1:/imagegif($nimage, $destination);imagejpeg($nimage, $destination);break;case 2:imagejpeg($nimage, $destination);break;case 3:imagepng($nimage, $destination);break;case 6:imagewbmp($nimage, $destination);/imagejpeg($nimage, $destination);break;/覆盖原上传文
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 针对2025年互联网+教育行业资金申请指南
- 2025年新能源行业绿色制造工艺标准在新能源企业绿色办公中的应用报告
- 新能源领域客户体验改进:2025年数字化转型研究报告
- 【初中语文】第1课《消息二则》课件++2025-2026学年统编版语文八年级上册
- 考研艺术专硕资料(3篇)
- 郭继承道路自信课件
- 个人卫生课程试题及答案
- 魔法师课件教学课件
- 基金从业考试压题及答案解析
- 公共安全管理知识题库及答案解析
- 设备维保中的环境保护与能源管理
- 混合型脑性瘫痪的护理课件
- 眼科专业视野培训教材
- 乳房疾病的诊断与治疗
- 青蓝工程教师成长档案
- 中建室内中庭墙面铝板、玻璃安装施工方案(改)
- 中秋佳节给客户的一封信(10篇)
- 二维码见证取样操作手册广西
- 学生心理健康档案表格
- 雨污水管道专项工程施工组织设计方案
- 毕业论文-线路二次电弧熄灭时刻扑捉方法研究及仿真分析
评论
0/150
提交评论