我上传图片怎么传不了呀?
程序代码:
<% str=request.form("file1") kname=mid(str,instrrev(str,".")) if kname=".jpg" or kname=".gif" then response.write kname 'str= Request.BinaryRead(Request.TotalBytes) 'str="c:\web\123.gif" response.write(str) set obj=server.CreateObject("adodb.stream") obj.Type=1 obj.open obj.LoadFromFile str '读取文件内容 d1=cstr(date()) d2=replace(cstr(time()),":","") x1=server.MapPath("xx") '上传在xx文件夹下去 x2=replace(x1,"\","/") '将本地\转换成/ response.write x2&"/"&d1&d2&kname '看一下文件名和路径 obj.SaveToFile x2&"/"&d1&d2&kname,2 '输出文件内容到 文件 response.write "<script> alert('sdafasd');</script>" else response.Redirect("examload.html") end if %>obj.LoadFromFile str '读取文件内容 说这行有错误