if request("action") = "new" then
response.buffer=true formsize=request.totalbytes '获取提交数据量的总字节数 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)
iname = inohtml(trim(request("name"))) iszid = inohtml(trim(request("szid"))) iqq = inohtml(trim(request("qq"))) ihomeurl = inohtml(trim(request("homeurl"))) imail = inohtml(trim(request("mail"))) ititle = inohtml(trim(request("title"))) icontent = inohtml(trim(request("content"))) iface = request("face") iip = request.servervariables("Remote_Addr") itime = now() if iname="" or imail="" or iqq="" or icontent="" or ititle="" then ierror = "带*号项不能为空!" elseif isvalidemail(imail) = false then ierror = "邮箱格式不正确!" elseif IsNumeric(iqq) = false then ierror = "你的QQ号要是数字哦!" elseif len(iqq) < 5 or len(iqq) >12 then ierror = "你不可能有这样的QQ吧?" elseif len(ititle) > 100 then ierror = "留言标题不能超过100个字!" elseif len(icontent) < 8 then ierror = "你的留言字数不能小于8个。拿点灌水的勇气出来嘛!" elseif len(icontent) > imax then ierror = "你的话太多了呀,枪毙!" else strconn = "select * from ebook" set rs = server.createobject("adodb.recordset") rs.open strconn, conn, 1, 3 rs.addnew rs("fname") = iname rs("fszid") = iszid rs("fqq") = iqq rs("fhomeurl") = ihomeurl rs("fmail") = imail rs("ftitle") = ititle rs("fcontent") = icontent rs("ftime") = itime rs("fip") = iip rs("fface") = iface rs("fimg").AppendChunk myData rs.update rs.close set rs = nothing if err.number = 0 then response.redirect ("index.asp") else session("imsg") = "2" response.redirect ("msg.asp")'这里就是报错的地方 end if end if end if %>