能解释下代码啊 !!!
黑乎乎的都不知道那是那!!!!!!!!
小弟太菜不好意思!!!
麻烦了!!
写入数据库代码
<%
dim rs
dim formsize,formdata,bncrlf,divider,datastart,dataend,mydata
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)
%>
<!--#include file="conn.asp"-->
<%
Sqlcmd="SELECT * from pic where idname='"&session("idtu")&"'"
set res=conn.Execute(Sqlcmd)
if res.EOF Then
sql="select * from pic order by id desc"
set rs=conn.execute(sql)
id=rs("id")
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "pic",conn,3,2
rs.addnew
rs("big").appendchunk mydata
rs("idname")=session("idtu")
rs.update
set rs=nothing
set conn=nothing
response.redirect "sendphoto.asp"
%>
<%
else
%>
<script language="javascript">
alert("本站限制一张图片,若想更新,请删除原图片!")
window.location="../dianjiadenglu1.asp"
</script>
<%
end if
%>
<%
dim rs
dim formsize,formdata,bncrlf,divider,datastart,dataend,mydata
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)
%>
这些是干什么用的 ????