Foxtable(狐表)用户栏目专家坐堂 → [求助]上传图片问题???


  共有2832人关注过本帖树形打印复制链接

主题:[求助]上传图片问题???

帅哥哟,离线,有人找我吗?
狐狸爸爸
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:47448 积分:251060 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2014/6/3 8:45:00 [显示全部帖子]

参考:
http://www.foxtable.com/help/topics/1410.htm


 
帮助有这样的代码:
 
Dim ftp1 As New FtpClient
ftp1.Host="196.128.143.28"
ftp1.Account = "foxuser"
ftp1.Password = "138238110"
If ftp1.Upload("c:\data\Desert.jpg","\update\Desert.jpg") = True Then
    Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
    Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
 
稍微改一下:
 
 
Dim ftp1 As New FtpClient
ftp1.Host="196.128.143.28"
ftp1.Account = "foxuser"
ftp1.Password = "138238110"
dim fl as string = Tables("表名").Current("列名")
If ftp1.Upload(ProjectPath & "Attachments\" & fl.,"\ftp目标路径\" & fl) = True Then
    Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
    Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
 


 回到顶部