Jump to content

[SOLVED]Uploading files with FTPEx


 Share

Recommended Posts

Using this code I found here, I've tried too many times to see why It doesn't work Posted Image I try uploading a rar archive and it appears at www.DriveHQ.com for only about 4-6 seconds Posted Image at 0kb in size and then it just DISAPPEARS never to be seen again every time... WHY IS THIS HAPPENING!!?!?!

===============================================================================================================================================

EDIT: I Found out what was wrong, I wasn't assigning a port which should have been 21 for ftp.drivehq.com

I was also overlooking passive mode which I set to "one" when I used command prompt. I would receive an error stating that passive mode should be enabled for the web site I was uploading to. the below code should work for windows 7.

#include 

$server = 'ftp.drivehq.com'
$i_Passive = '1'
$port = '21'
$username = 'USERNAME'
$pass = 'PASSWORD'

$Open = _FTP_Open('FTP')
$Conn = _FTP_Connect($Open, $server, $username, $pass,$i_Passive,$port)
_FTP_FilePut($Conn,"test.txt","/test.txt")
_FTP_Close($Open)

Apparently the file to upload should be relevant to the current working directory.

Edited by xJSLRx
Link to comment
Share on other sites

You are asking so many questions, but don't want to make the effort yourself to figure things out. Read the help file, make sure you are putting the file into a directory that is allowed to accept uploading. You in my book are becoming very suspect.

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...