上传图片文件,怎么显示不出来呢,怀疑是上传的时候就有问题。
d6.asp文件代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title></title></head><body><form action="d7.asp" method="post" enctype="multipart/form-data" name="form1" id="form1"> <table width="429" border="1" align="center" cellpadding="4" cellspacing="0" rules="none"> <tr> <th width="417" scope="col">上传照片</th> </tr> <tr> <td height="60" align="center">选择图片所在的文件: <input type="file" name="tupian1" id="tupian1" /></td> </tr> <tr><td align="center"><input type="submit" name="button" id="button" value="开始上传"></td> </tr> </table></form></body></html>
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%><!--#include file="conn.asp" --><%dim ccc,dddccc="select * from shangchuan"set ddd=server.createobject("adodb.recordset")ddd.open ccc,aaa,1,3%><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title></title></head><body><%a1=request.TotalBytesa2=request.BinaryRead(a1)a3=chr(13)&chr(10)a4=left(a2,clng(instr(a2,a3)))response.write(a4)a5=instr(a2,a3&a3)+4response.write(a5)a6=instr(a5+1,a2,a4)-a5response.write(a6)a7=mid(a2,a5,a6)response.write(a7)ddd.addnewddd("photo").AppendChunk a7ddd.updateddd.close%></body></html><%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%><!--#include file="conn.asp" --><%dim ccc,dddccc="select * from shangchuan"set ddd=server.createobject("adodb.recordset")ddd.open ccc,aaa,1,3%><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title></title></head><body><%do while not ddd.eof%><img src="d8.asp?xuhao=<%=ddd("id")%>"><%ddd.MoveNextloop%></body></html><!--#include file="conn.asp" --><%dim ccc,dddccc="select * from shangchuan where id='"&request("xuhao")&"'"set ddd=server.createobject("adodb.recordset")ddd.open ccc,aaa,1,3%><%response.ContentType="image/*"response.BinaryWrite ddd("photo").getChunk(8000000)%>