Download a file from the FTP server, and save it into a local file:
The ftp_get() function gets (downloads) a file from the FTP server, and saves it into a local file.
Parameter | Description |
---|---|
ftp_connection | Required. Specifies the FTP connection to use |
local_file | Required. Specifies the local file path (will be overwritten if the file already exists) |
server_file | Required. Specifies the server file to download |
mode | Required. Specifies the transfer mode. Possible values: FTP_ASCII or FTP_BINARY |
startpos | Optional. Specifies the position in the remote file to start downloading from |
Return Value: | Returns TRUE on success or FALSE on failure |
---|---|
PHP Version: | 4+ |
PHP Changelog: | The startpos parameter was added in PHP 4.3.0 |