[eluser]Justin Patel[/eluser]
Hello All,
I am trying to upload images using ftp. Using below code I got the list of files in the directory.
But I am unable to upload image, It gives error like
" Unable to locate the source file. Please check your path. "
I have stuck here form last 7-9 hors.
Please give me some solution...
Code:
$path = 'd:\test.gif';
$this->load->library('ftp');
$config['hostname'] = 'XXXXXXXX.net';
$config['username'] = 'XXXXX';
$config['password'] = 'XXXXX';
$config['debug'] = TRUE;
$this->ftp->connect($config);
$DestPath = '/public_html/projects/affiliate/listingImages/';
$this->ftp->upload($path, $DestPath, 'ascii', 0777);
$list = $this->ftp->list_files('/public_html/projects/affiliate/listingImages/');
print_r($list);
$this->ftp->close();
Some time it gives error " Unable to upload the specified file. Please check your path. "
Thanks for viewing