求ASP+sql 图片上传代码

cwj1983 2006-02-23 02:36:31
求一段文本和图片同步上传的代码,
...全文
181 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
kafly 2006-03-08
  • 打赏
  • 举报
回复
到底想要什么?
加QQ说 945881
cwj1983 2006-02-24
  • 打赏
  • 举报
回复
有全面一点的吗?
kafly 2006-02-23
  • 打赏
  • 举报
回复
不给分?
楼上这个只能显示图片,图片文件名丢了啊

response.Expires = 0
response.Buffer = True
response.Clear
Response.AddHeader "Content-Disposition","attachment;filename=" & filename
response.contentType = Session("Type")
response.BinaryWrite Session("Bytes")

这样比较全一点,改改吧
hyq8848 2006-02-23
  • 打赏
  • 举报
回复
数据库插入
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)
提取数据
rs.Open "select pic from tbl_user where xzqh='"&xzqh&"' and dwbm='"&dwbm&"' and name='"&name&"'", ,3,1
if isnull(rs("pic"))=false then
Response.ContentType = "image/gif"
response.BinaryWrite rs("pic").getChunk(7500000)
else
response.Redirect("../images/wuren.jpg")
end if
rs.close
显示
<img src="*.asp">
rs.Open "select * from tbl_user where name='"&name&"' and xzqh='"&xzqh&"' and dwbm='"&dwbm&"'", ,3,3

rs("pic").appendchunk mydata
rs.update
rs.close
cn.close
stoneloveice 2006-02-23
  • 打赏
  • 举报
回复
给个邮箱,给你发过去.
caoqingqing 2006-02-23
  • 打赏
  • 举报
回复
http://topic.csdn.net/t/20020324/23/597170.html

http://topic.csdn.net/t/20020324/23/597165.html

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧