|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
ASP脚本是采用明文(plain text)方式来编写的。 这里是我依据gif图象格局想出来的判别gif图象尺寸的办法,请人人给点定见
up.htm
< html >
< body >
< form action="up.asp" ENCTYPE="multipart/form-data" method="post" >
< table border=0 width=100% cellspacing="0" >
< tr >
< td width="30%" >请选择您要上传的gif图片:< /td >
< td width="70%" >< input type="file" name="pic" style="font-size:10pt;" >< /td >
< /tr >
< /table >
< p align="center" >< input type="submit" value="提交" style="font-size:9pt;background-color:#54B060;color:white;" >
< /form >
< /body >
< /html >
up.asp
< %
FormSize = Request.TotalBytes
FormData = Request.BinaryRead( FormSize )
bncrlf=chrb(13) & chrb(10)
divider=leftb(formdata,instrb(formdata,bncrlf)-1)
datastart=instrb(formdata,bncrlf & bncrlf)+4
dataend=instrb(datastart+1,formdata,divider)-datastart
Image=midb(formdata,datastart,dataend)
head_version = Ascb( midb( Image,1,3 ) )
head_subversion = Ascb( midb( Image,4,3 ) )
head_width_l = Ascb( midb( Image,7,1 ) )
head_width_h = Ascb( midb( Image,8,1 ) )
head_height_l = Ascb( midb( Image,9,1 ) )
head_height_h = Ascb( midb( Image,10,1 ) )
head_colors = Ascb( midb( Image, 11, 1 ) )
head_width_h = head_width_h * 256
head_height_h = head_height_h * 256
head_colors = head_colors And &H07
Response.Write "图象巨细为" & head_width_h + head_width_l & "x" & head_height_h + head_height_l _
& "x" & 2^( head_colors + 1 )
% >
</p> 缺点:正版成本价格贵(盗版就不说了)、不够安全,大多数服务器用windows系统,没有linux安全 |
|