asp另存为文件名-名称-类型
2011年08月01日
我的文件
名称:Response.AddHeader "content-disposition", "attachment; filename="&rs("user")
类型:response.ContentType="image/jpeg"
-----------------
Response.Clear
Response.ContentType = "application/octet-stream"
Response.AddHeader "content-disposition", "attachment; filename="&name
Set Stream = server.CreateObject("ADODB.Stream")
Stream.Type = adTypeBinary
Stream.Open
Stream.LoadFromFile Server.MapPath(FileName)
While Not Stream.EOS
Response.BinaryWrite Stream.Read(1024 * 64)
Wend
Stream.Close
Set Stream = Nothing
--------------------
以下是ASP图文混合上传的实例:
数据库驱动自己改一下
upload.asp:
File Upload
'
Please choose a picture to upload:
upimage.asp
uptext.asp
show.asp
以下是你的上传资料。
文本一:
文本二:
你的图像:
>
showimg.asp
2011年08月01日
我的文件
名称:Response.AddHeader "content-disposition", "attachment; filename="&rs("user")
类型:response.ContentType="image/jpeg"
-----------------
Response.Clear
Response.ContentType = "application/octet-stream"
Response.AddHeader "content-disposition", "attachment; filename="&name
Set Stream = server.CreateObject("ADODB.Stream")
Stream.Type = adTypeBinary
Stream.Open
Stream.LoadFromFile Server.MapPath(FileName)
While Not Stream.EOS
Response.BinaryWrite Stream.Read(1024 * 64)
Wend
Stream.Close
Set Stream = Nothing
--------------------
以下是ASP图文混合上传的实例:
数据库驱动自己改一下
upload.asp:
File Upload
'
Please choose a picture to upload:
upimage.asp
uptext.asp
show.asp
以下是你的上传资料。
文本一:
文本二:
你的图像:
>
showimg.asp