aa.asp代码
<%
FormSize = Request.TotalBytes
FormData = Request.BinaryRead( FormSize )
function ImageUp(formsize,formdata)
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
p_w_picpathup=midb(formdata,datastart,dataend)
end function
Image=ImageUp(FormSize,Formdata)
cn1 = "Server.CreateObject('ADODB.Connection')"
strProvider ="driver={microsoft access driver (*.mdb)};dbq="&server.MapPath("imgs.mdb")
sql="SELECT * FROM aa"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql,strProvider,1,3
rs.AddNew
rs("img").appendchunk("image")
rs.Update
rs.Close
response.contenttype="p_w_picpath/gif"
response.binarywrite p_w_picpathup(formsize,formdata)
%>
首页代码:
<html>
<body>
<center>
<form name="mainForm" enctype="multipart/form-data" action="aa.asp" method=post>
<input type=file name=mefile><br>
<input type=submit name=ok value="OK">
</form>
</center>
</body>
</html>
我一点击OK,就出错了.大家帮忙看看.
错误类型:
Microsoft VBScript 运行时错误 (0x800A000D)
类型不匹配: 'p_w_picpathup'
/ccc/新建 WinRAR ZIP 压缩文件/test/aa.asp, 第 26 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
网页:
POST 6135 ??? /ccc/新建 WinRAR ZIP 压缩文件/test/aa.asp
POST Data:
错误 '80020009'
发生意外。
/iisHelp/common/500-100.asp,行 219