The following command returns true and uploads the text XML file to the FTP server:
if (ftp_put($this->ftpConnectionId, $this->remoteXmlFileName, $this->localXmlFileName, FTP_ASCII)) {
However, when I try to upload a .zip file intead of a text XML file, it still returns true but does not upload the file:
if (ftp_put($this->ftpConnectionId, $this->remoteXmlFileName, $this->localXmlFileName, FTP_BINARY)) {
I found that if I simply rename the zip file to ".xml", it WILL upload the file but the .zip file is corrupted.
But if I rename the zip file to ".zip.xml" it again returns true but does not upload the file.
What could be the reasons for this odd behavior?
Additional Info:
A zip file can be uploaded via FileZilla no problem with the same account.
I also am specifing:
ftp_pasv($this->ftpConnectionId, true);