AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Comunicación / Funciones FTP
  • Example 1: Anonymous connection
  • Example 2: Passive connection
  • Example 3: Connecting to an FTP server via a connection window
FTPConnect (Example)
Example 1: Anonymous connection
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsJavaCódigo de Usuario (UMC)Ajax This example is used to establish an anonymous connection to the FTP server identified by its IP address. The port used is the default port (21) and the password sent to the server corresponds to the default email address of the current computer.
nConnection is int
nConnection = FTPConnect("192.108.10.2")
Example 2: Passive connection
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsJavaCódigo de Usuario (UMC)Ajax This example performs a passive connection to the FTP account named "SMITH" on the "ftp.cdrom.com" FTP server. This connection is performed on port 2001.
nConnection is int
nConnection = FTPConnect("ftp.cdrom.com", "Smith", "Password", 2001, True)
Example 3: Connecting to an FTP server via a connection window
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsJavaCódigo de Usuario (UMC)Ajax This example allows the user to connect to an FTP server via a connection window. This window allows the user to choose the connection parameters.
The code below corresponds to the code of the CONNECT button.
// Open the connection
IF gbAnonymous = False THEN
// Named connection
IF gbAdvanced = False THEN
// Standard setting
gnConnectionID = FTPConnect(gsFTP_Address, gsUser_Name, gsUser_Pwd)
ELSE
// Advanced setting
gnConnectionID = FTPConnect(gsFTP_Address, gsUser_Name, ...
gsUser_Pwd, gnPort_Number, bType, gnTimeout)
END
ELSE
// Anonymous connection
IF gbAdvanced = False THEN
// Standard setting
gnConnectionID = FTPConnect(gsFTP_Address)
ELSE
// Advanced setting
gnConnectionID = FTPConnect(gsFTP_Address, "", "", gnPort_Number, bType, gnTimeout)
END
END
Versión mínima requerida
  • Versión 9
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/05/2022

Señalar un error o enviar una sugerencia | Ayuda local