请saucer帮助解决。

arrow1971 2002-09-27 09:17:15
Inet控件Execute方法POST二进制数据,服务器端仅收到HTTP头,而收不到二进制数据。
对这问题也尝试过用Inet发送一些附加HTTP头信息,但未见效。
Web服务器为IIS 5.0

谢谢!
...全文
30 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
zyl910 2002-10-11
  • 打赏
  • 举报
回复
这样就够了,不要()
Get #1, , binVar
zyl910 2002-10-11
  • 打赏
  • 举报
回复
试试:
Dim binVar() As Byte

Open "c:\gg.gif" For Binary Access Read As #1
ReDim binVar(1 To LOF(1))
Get #1, , binVar()
Close #1

Inet1.Execute "http://127.0.0.1/upload.asp", "POST", binVar, "Content-Type: application/x-www-form-urlencoded"

saucer 2002-10-11
  • 打赏
  • 举报
回复
try

PostData = StrConv(binVar, vbFromUnicode)
Inet1.Execute "http://127.0.0.1/upload.asp", "POST", PostData, "Content-Type: application/x-www-form-urlencoded"

arrow1971 2002-09-27
  • 打赏
  • 举报
回复
谢谢!

Dim binVar(100) As Byte

Open "c:\gg.gif" For Binary Access Read As #1
ReDim binVar(LOF(1))
Get #1, , binVar()
Close #1

Inet1.Execute "http://127.0.0.1/upload.asp", "POST", binVar, "Content-Type: application/x-www-form-urlencoded"

最后的HTTP头 Content-Type 有待推敲。
gxingmin 2002-09-27
  • 打赏
  • 举报
回复
为什么一定要saucer解决呢?
我也会呀
你把你的代码贴出来看看
arrow1971 2002-09-27
  • 打赏
  • 举报
回复
解决了即给分!
jisheng 2002-09-27
  • 打赏
  • 举报
回复
呵呵
saucer是谁?:)
arrow1971 2002-09-27
  • 打赏
  • 举报
回复
诚心诚意,愿再加100分。

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧