當前位置:首頁 » 文件管理 » 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

熱點內容
怎麼連接動車上的wifi密碼多少 發布:2025-03-18 22:49:34 瀏覽:531
密碼放在什麼文件夾裡面 發布:2025-03-18 22:48:12 瀏覽:316
shell腳本自動執行 發布:2025-03-18 22:22:53 瀏覽:404
長城電腦桌面雲伺服器放在哪裡 發布:2025-03-18 22:22:51 瀏覽:484
我的世界積分板做伺服器 發布:2025-03-18 22:12:06 瀏覽:792
暗黑哪個文件夾可以下載 發布:2025-03-18 22:11:17 瀏覽:783
root腳本和免root腳本 發布:2025-03-18 22:04:17 瀏覽:506
怎麼弄黑框字體安卓 發布:2025-03-18 22:04:14 瀏覽:174
怎麼知道我的世界伺服器的密碼 發布:2025-03-18 21:43:48 瀏覽:177
android專家 發布:2025-03-18 21:41:16 瀏覽:802