新微赢技术网

标题: 求助高手 [打印本页]

作者: ξǒひ糀無蒛    时间: 2010-1-19 01:04
标题: 求助高手
下面是图片上传的一些代码,能帮我说详细的注释一下。这几句我看不懂:
divider=leftB(formdata,clng(instrb(formdata,bncrlf))-1
datastart=instrb(formdata,bncrlf&bncrlf)+4
dataend=instrb(datastart+1,formdata,divider)-datastart

option explicit
dim conn.dbpath
dim rs.sql
dim formsize,formdata,bncrlf,divider,datastart,mydata,dataend
set conn=server.createobject("adodb.connection")
dbpath=server.mappath("db.mdb")
conn.open "driver={microsoft access driver (*.mdb)}"dbq="&dbpath
set rs=server.createobject("adodb.recordset")
sql="select*from photo"
rs.open sql,conn,3,2
formsize=request.totalbytes
formdata=requext.binaryread(formsize)
bncrlf=chrB(13)&chr(10)
divider=leftB(formdata,clng(instrb(formdata,bncrlf))-1
datastart=instrb(formdata,bncrlf&bncrlf)+4
dataend=instrb(datastart+1,formdata,divider)-datastart
mydata=midb(formdata,datastart,dataend)
rs.addnew
rs("img').appendchunk=mydata
rs.update
rs.close
set rs=nothing
set conn=nothing
response.redirect
%>




欢迎光临 新微赢技术网 (http://bbs.weiying.cn/) Powered by Discuz! X3.2