标题:求助高手
取消只看楼主
binbinbin
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2005-11-30
 问题点数:0 回复次数:0 
求助高手
下面是图片上传的一些代码,能帮我说详细的注释一下。这几句我看不懂:
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
%>
搜索更多相关主题的帖子: option color 图片 
2005-12-02 19:32



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-36378-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.246320 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved