The ftp_fput() function uploads from an open file and saves it to a file on the FTP server.
bool ftp_fput ( resource $ftp_stream , string $remote_file , resource $handle [, int $mode = FTP_IMAGE [, int $startpos = 0 ]] )
ftp_fput() uploads the data from a file pointer to a remote file on the FTP server.
Parameter | Description |
---|---|
ftp_stream | The link identifier of the FTP connection |
remote_file | The remote file path |
handle | An open file pointer on the local file. Reading stops at end of file |
mode | The transfer mode. Must be either FTP_ASCII or FTP_BINARY |
startpos | The position in the remote file to start uploading to |
Returns TRUE on success or FALSE on failure.