<!--metadata type="typelib"
uuid="00000205-0000-0010-8000-00aa006d2ea4"
name="adodb type library"
-->
<%
dim objstream
set objstream = server.createobject("adodb.stream")
' 创建一个stream 对象.
objstream.type = adtypebinary
objstream.open
objstream.loadfromfile "d:\inetpub\wwwroot\images\chunfeng.gif"
' 用stream对象的loadfromfile方法打开一个gif文件.
' 输出stream 对象连接.
response.contenttype = "image/gif"
' 指定操作文件类型的信息,二进制还是text,如果是text还要指定是ascii还是unicode格式.
response.binarywrite objstream.read
objstream.close
set objstream = nothing
' 清空.
%>
[1]
发表评论