FTP Problem Extra Characters
Posted: Mon Aug 23, 2004 10:48 am
I have a problem when FTP'ing a file. I am creating a flat text file and saving in on a linux web server. Using PHP I FTP the file and then change the name of the file. I use this command:
ftp_put($ftp,$new_file,$file_name,FTP_ASCII);
ftp_rename($ftp,$new_file,$rename_file);
Every line on my file ends with a carriage return character and new line character (\r\n). When I view this file on the web server everything is fine. After I ftp the file I have some sort of extra space, in the text editor, EditPlus, it looks like a small square at the end of every line. This square causes problems for the program that picks up the file from the ftp site. Has anyone else had this problem? Does anyone have a fix for this problem? Thanks
ftp_put($ftp,$new_file,$file_name,FTP_ASCII);
ftp_rename($ftp,$new_file,$rename_file);
Every line on my file ends with a carriage return character and new line character (\r\n). When I view this file on the web server everything is fine. After I ftp the file I have some sort of extra space, in the text editor, EditPlus, it looks like a small square at the end of every line. This square causes problems for the program that picks up the file from the ftp site. Has anyone else had this problem? Does anyone have a fix for this problem? Thanks