Dhaval - 2011-07-26 21:42:05
Hi,
I am opening a file on a remote FTP location (let's call it FTP 1) using file_get_contents and completely reading it. The file size on an average is about 25000 bytes. This file contains XML tags. Next, I am opening another a new file on FTP location (say FTP 2) and using fwrite, I am writing the contents of the file on FTP 1 to the file on FTP 2.
In about 80% of the cases, the file on FTP 2 gets successfully written. However, in about 20% of the cases, the file on FTP 2 is either 0 bytes or 8688 bytes.
I have not been able to identify why the file is not written successfully on some occasions. If you can throw any light on this problem, I will be very grateful.
Thanks,
Dhaval