Image Upload
三.附件上传
涉及技术点:
<form enctype=”multipart/form-data”>
<input type=”file”>
</form>
$_FILES接收附件信息
name size tmp_name type error
(error: 0没有问题 1/2大小超限制 3只上传部分附件 4没有上传附件)
move_uploaded_file(临时路径名附件,真实路径名附件)
array(9) {
["name"] => string(11) "图片1.png"
["type"] => string(9) "image/png"
["size"] => int(15427)
["key"] => int(0)
["ext"] => string(3) "png"
["md5"] => string(32) "4be81fad92cab248ec9b82f67ad6dc6e" //加密字符串
["sha1"] => string(40) "37f0e9cf2a3579116c3f2175bada84b856f52fd3" //秘钥
["savename"] => string(17) "57471e7b55864.png"
["savepath"] => string(11) "2016-05-27/"
}