CI_FTP::download()

download($rempath, $locpath[, $mode = 'auto'])

Parameters:
  • $rempath (string) – Remote file path
  • $locpath (string) – Local file path
  • $mode (string) – FTP mode, defaults to ‘auto’ (options are: ‘auto’, ‘binary’, ‘ascii’)
Returns:

TRUE on success, FALSE on failure

Return type:

bool

Downloads a file from your server. You must supply the remote path and the local path, and you can optionally set the mode. Example:

$this->ftp->download('/public_html/myfile.html', '/local/path/to/myfile.html', 'ascii');

If ‘auto’ mode is used it will base the mode on the file extension of the source file.

Returns FALSE if the download does not execute successfully (including if PHP does not have permission to write the local file).

doc_CodeIgniter
2016-10-15 16:31:35
Comments
Leave a Comment

Please login to continue.