当前位置:首页 » 文件管理 » vbxmlhttp上传

vbxmlhttp上传

发布时间: 2023-07-04 14:37:18

A. VB6用Microsoft.XMLHTTP 上传文件(文本,二进制)和FORM 字段

要看你的java业务层是什么写的,如果是一般的jsp或是servlet,就可以用提取C#语言操纵IE方法提取从服务器请求回来的html页面对html标记取内容,如果是struts1或者是struts2作为业务层的话,就没办法取得

B. vb6如何实现上传http站点呢

1.使用socket方式,通过tcp连接web服务器的80端口,发送http协议命令.来实现传输.但太底层.都需要自己来实现.不好,
2.使用xmlhttp控件.vb使用他,快速简单,可以选择get/post方式
下面是使用的封装函数.
Function xmlread(url) As String ''用xml读网页文件
Set http = CreateObject("Microsoft.XMLHTTP")
http.open "post", url, False
http.setRequestHeader "Content-Type", "text/XML"
http.setRequestHeader "Content-Type", "gb2312"
http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
http.send
If http.readyState = 4 Then
xmlread = Trim(bytes2BSTR(http.responseBody))
Else: xmlread = "error"
End If
Set http = Nothing
End Function
Function xmlpost(url, Form) As String '''用xml传网页表单数据
Set http1 = CreateObject("Microsoft.XMLHTTP")
http1.open "post", url, False
http1.setRequestHeader "Content-Type", "text/XML"
http1.setRequestHeader "Content-Type", "gb2312"
http1.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
http1.send Form
If http1.readyState <> 4 Then
xmlpost = "error"
End If
Set http1 = Nothing
End Function

热点内容
c语言中的temp 发布:2025-02-05 02:43:08 浏览:123
阿里云服务器共享电脑 发布:2025-02-05 02:42:18 浏览:417
服务器有多少台电脑 发布:2025-02-05 02:40:41 浏览:447
安卓手机为什么最新微信安装不了 发布:2025-02-05 02:31:03 浏览:106
安卓手机什么时候开售 发布:2025-02-05 02:14:15 浏览:660
编程车模型 发布:2025-02-05 02:09:55 浏览:681
雅马哈天剑哪个配置好 发布:2025-02-05 02:00:35 浏览:170
我的世界国际服推荐118服务器 发布:2025-02-05 01:50:48 浏览:46
普通电脑做服务器怎么操作 发布:2025-02-05 01:46:22 浏览:628
原神为什么同服务器加不起好友 发布:2025-02-05 01:41:03 浏览:337