ASP+access图片上传 要求把上传的图片改名为最新的ID号

来源:百度知道 编辑:UC知道 时间:2024/09/26 00:21:31
mofei.mdb mofeibook表 id自动编号

要求上传图片名改为id+20090000

<img src="<%=showbbs("id")+("20090000")%>.jpg" height="250">

<head>
<meta http-equiv="Content-Language" content="zh-cn">
</head>
<center><%Response.Expires=0:if Request.TotalBytes then:set a=createobject("adodb.stream"):a.Type=1:a.Open:a.write Request.BinaryRead(Request.TotalBytes):a.Position=0:b=a.Read:c=chrB(13)&chrB(10):d=clng(instrb(b,c)):e=instrb(d+1,b,c):set f=createobject("adodb.stream"):f.type=1:f.open:a.Position=d+1:a.copyto f,e-d-3:f.Position=0:f.type=2:f.CharSet="GB2312":g=f.readtext:f.Close:h=mid(g,instrRev(g,"\")+1,e):i=instrb(b,c&c)+4:j=instrb(i+1,b,leftB(b,d-1))-i-2:f.Type=1:f.Open:a.Position=i-1:a.CopyTo f,j:f.SaveToFile server.mappath(h),2:f.Close:set f=Nothing:a.Close:set a=Nothing:response.write "<a href="&Server.URlEncode(h)&" target=_blank>"& h &"</a>"%>
<form enctype=multipart/form-data method=post name="uploada">
<input type=file name=fe