Foxtable(狐表)用户栏目专家坐堂 → 找不到文件。。。


  共有3475人关注过本帖平板打印复制链接

主题:找不到文件。。。

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


加好友 发短信
等级:九尾狐 帖子:2355 积分:16187 威望:0 精华:0 注册:2013/9/1 8:09:00
找不到文件。。。  发帖心情 Post By:2014/7/31 9:46:00 [只看该作者]

各位老师好,

Dim vtxt As String = "Version.txt"
Dim pzip As String = "Publish.zip"
Dim utxt As String = "update.txt"
Dim uzip As String = "update.zip"

Dim ftp As New FTPClient
ftp.Host = "42.51.152.221"
ftp.Account = "abc"
ftp.Password = "abcdef"
ftp.Port = "21"
ftp.RootDir = "\fox\lls\Update" '如果升级所需文件刚好放置在FTP的根目录下,可以不用设置此属性;否则需要设置目录路径.
'ftp.RootDir = "\升级文件所在目录"

Dim zip As New ZipFile

'连接FTP服务器--------------------
If ftp.Connected = False '如果FTP没有连接
    If ftp.Connect Then '连接FTP
   '     MessageBox.Show("FTP服务器连接成功!")
    Else
        MessageBox.Show("FTP服务器连接失败!")
        Return
    End If
End If

'检测升级所需的4个文件--------------------
If ftp.FileExists(vtxt) = False OrElse ftp.FileExists(pzip) = False OrElse ftp.FileExists(utxt) = False OrElse ftp.FileExists(uzip) = False Then
    MessageBox.Show("服务器缺少升级所需文件!" & vbcrlf & vtxt & "  " & pzip & "  " & utxt & "  " & uzip,"提示",MessageBoxButtons.OK,MessageBoxIcon.Error)
    Return
End If


图片点击可在新窗口打开查看此主题相关图片如下:ftp.jpg
图片点击可在新窗口打开查看


明明FTP上有,

项目却死活 执行了这条代码:

 MessageBox.Show("服务器缺少升级所需文件!" & vbcrlf & vtxt & "  " & pzip & "  " & utxt & "  " & uzip,"提示",MessageBoxButtons.OK,MessageBoxIcon.Error)

不知道什么情况。。。 



 回到顶部
总数 19 1 2 下一页