How to upload file to remote FTP server using Varien_Io_Ftp in Magento?
magento
Solution
Here is my solution. Thanks to @SKV.
$ftp = new Varien_Io_Ftp();
$ftp->open(
array(
'host' => $myhost,
'user' => $myuser,
'password' => $mypass,
)
);
$flocal = fopen(Mage::getBaseDir() . DS . 'test.csv', 'r');
$ftp->write('test.csv', $flocal);
$ftp->close();
Problem
I have csv file and want to upload it to remote FTP server. I see that Magento has Varien_Io_Ftp class, but I cannot find any good documentation or example of its usage. Can somebody help me and give a good example?