码迷,mamicode.com
首页 > 其他好文 > 详细

利用PBFunc在Powerbuilder中进行FTP操作

时间:2017-07-23 01:02:19      阅读:250      评论:0      收藏:0      [点我收藏+]

标签:std   file   步骤   http   .dll   tar   文件   arp   .com   

PBFunc.dll包含了FTP的操作,使用FTP时主要需要以下步骤:

1.调用of_Login函数登录Ftp服务器

2.调用FTP的各种方法

3.Ftp操作完毕后调用of_LoginOut方法进行注销

代码如下:

n_pbfunc_ftp lnv_ftp
IF Not lnv_ftp.of_Login("192.168.68.21",21,"ftpuser","123456") Then
	MessageBox("提示","连接FTP服务器失败")
	return
End IF
long ll_files
string ls_files[]
ll_files = lnv_ftp.of_dir("/testdir/",ls_files)//获取文件列表
lnv_ftp.of_downloadfile("/testdir/I_20170626_00000001.dat","D:\I_20170626_00000001.dat")//下载文件
lnv_ftp.of_uploadFile("D:\comtemp.txt","/testdir/comtemp.txt")//上传文件

lnv_ftp.of_LoginOut()///注销

  代码下载:http://files.cnblogs.com/files/wangxianjin/PBFuncLib170722%E6%9C%89%E5%BC%B9%E7%AA%97%E5%8F%A3%E7%89%88.rar

利用PBFunc在Powerbuilder中进行FTP操作

标签:std   file   步骤   http   .dll   tar   文件   arp   .com   

原文地址:http://www.cnblogs.com/wangxianjin/p/7223298.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!