Jump to content


Question concerning FTP functions

  • Please log in to reply
2 replies to this topic

#1 cynical825

  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 01 August 2006 - 11:25 PM

I am looking to use some of the built-in FTP functions (http://us2.php.net/ftp) in a script I am working on and I have a quick question concerning one of the functions: ftp_put.

Say I am going to call ftp_put(stream, remote_file, local_file, mode) . I am confused about the remote_file and local_file arguments: Remote file would be the source, correct? And local_file is the destination? Also, does this mean remote_file can be a file on the end-users computer (ie. a file path: C:\WINDOWS\whatev.exe)?

Thanks for any help,

#2 hitman6003

  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 02 August 2006 - 01:28 AM


    The remote file path.

    The local file path.

When you execute the command you put 'local_file' on the server as 'remote_file'.  In other words, remote_file doesn't have to exist, when the command is executed it copies local_file to the server as remote_file, even if the file names differ.

#3 cynical825

  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 02 August 2006 - 02:02 AM

Ah, thanks :).

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users