Jump to content

Why FTP doesn't work?


Recommended Posts

Hello! Why the following code doesn't work? And how to check the status of the FTP connection?

e.g.

If @error Then Failed("Open")

If @error Then Failed("Connect")

If @error Then Failed("Upload")

Also doesn't work, why?

Func FTP_File_Upload()

$server = '127.0.0.1'

$username = 'test'

$pass = 'test'

$Open = _FTPOpen('MyFTP Control')

If @error Then Failed("Open")

$Conn = _FTPConnect($Open, $server, $username, $pass,21,1, 0x08000000,0)

If @error Then Failed("Connect")

$Ftpp = _FtpPutFile($Conn, 'd:\temp\test.txt', 'temp/test.txt')

If @error Then Failed("Upload")

$Ftpc = _FTPClose($Open)

EndFunc

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...