lzth.net
当前位置:首页 >> VB与FTP编程 >>

VB与FTP编程

这个吗

要实现在这个代码太多,在这里发有点不太现实,VB 实现 FTP 用 WinSock 控件或API。 做该类程序主要是握手控制,即返回值的处理并做相应传输,另外就是了解每个 FTP 命令的作用,这样做个 FTP 服务端或客户端都不是什么难事。

VB编写个程序上传文件到FTP,可用下面程序: Const SYNCHRONIZE = &H100000 Const INFINITE = &HFFFFFFFF Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProces...

使用Inet控件进行FTP操作 Inet1.Protocol = icFTP Inet1.RemoteHost = p_ServerName ' 服务器IP或者域名 Inet1.RemotePort = CInt(p_ServerPort) 'FTP端口 Inet1.UserName = uName 'FTP帐号 Inet1.Password = uPWS 'FTP密码 Inet1.Execute "", "...

Private Sub Command1_Click() Inet1.URL = "ftp://210.83.61.42/" Inet1.Password = "111" Inet1.UserName = "111" Inet1.OpenURL Inet1.Execute , "put d:\a.txt /d:/ftp/wwwroot/a.txt" 'put方法,d:\a.txt是本地路径 Inet1.Execute , "QUIT"...

Option Explicit Dim strCommand As String Dim strWebPage As String Private Sub Command1_Click() Winsock1.RemoteHost = "202.103.176.81" '返回或设置远程计算机,控件向它发送数据或从它那里接收数据。既可提供主机名,比如 "FTP://ftp.mi...

Option Explicit Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Private Info() As String, TimerCountA As Long Private WithEvents wscControl As MSWinsockLib.Winsock Private WithEvents wscData As MSWinsock...

我可以给你一些示例参考。

ftp> ? Commands may be abbreviated. Commands are:! delete literal prompt send ? debug ls put status append dir mdelete pwd trace ascii disconnect mdir quit type bell get mget quote user binary glob mkdir recv verbose bye hash m...

网站首页 | 网站地图
All rights reserved Powered by www.lzth.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com