当前位置: 移动技术网 > IT编程>开发语言>其他编程 > 如何实现无组件上传二进制文件?

如何实现无组件上传二进制文件?

2017年12月08日  | 移动技术网IT编程  | 我要评论

<!--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]

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网