CI_FTP::upload()

upload($locpath, $rempath[, $mode = 'auto'[, $permissions = NULL]])

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

TRUE on success, FALSE on failure

Return type:

bool

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

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

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

If set, permissions have to be passed as an octal value.

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

Please login to continue.