#12003/5/16 10:54:27
response.Buffer=true
info_id=session("info_id")
formsize=request.TotalBytes
if formsize>111600 then response.Redirect "admin_upload.asp?er=erorr" '如果大于100K时
formdata=request.BinaryRead(formsize)
bncrlf=chrb(13)&chrb(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)
set rs1=server.CreateObject("adodb.recordset")
sql="select * from t_info where c_info_id="&info_id
rs1.open sql,conn,1,1
if rs1.eof then
rs1.addnew
rs1("c_username")="admin"
rs1("c_info_image").appendchunk mydata
rs1.update
end if
更新代码如上?