Hello ...
I'm using the following code to upload a file via FTP from site1 to site2 is:
foreach($FilesUpload as $fName)
{
if ( ftp_put($connect, $fName, $fName, FTP_BINARY) )
{
echo '<font color="Green" face="Courier" size="1">File to '.$fName.' has been copied successfully to '.$Site.' !!</font><br>';
}
else
{
echo '<font color="Red" face="Courier" size="1">Cannot copy '.$fName.' to '.$Site.' !!</font><br>';
}
}
Is just working on ASCII files without any problems! But is not working on Binary files like images or Zend encoded files !!
the error shown below:
Warning: ftp_put(): Unable to access sleezy.gif in /home/mysite/public_html/update.php on line 95
The file path is correct!
Thanks