PHP ftp_put() Function

The ftp_put() function uploads a file to the FTP server.

bool ftp_put ( resource $ftp_stream , string $remote_file , string $local_file [, int $mode = FTP_IMAGE [, int $startpos = 0 ]] )

ftp_put() stores a local file on the FTP server.

Example -

ParameterDescription
ftp_streamThe link identifier of the FTP connection
remote_fileThe remote file path
local_fileThe local file path
modeThe transfer mode. Must be either FTP_ASCII or FTP_BINARY
startposThe position in the remote file to start uploading to

Returns TRUE on success or FALSE on failure.