John W. Holmes wrote:

Yeah, I could use a decent text editor, but not everyone who uses my

site

will use it. I need something that can edit them out after download.


Wouldn't it be smarter to eliminate them before it was saved on Windows?
You could read in the file and get rid of all of the \r characters with
str_replace().



Sorting out the end-of-line sequence is something ftp does by itself. Ensure the file has the correct end-of-line for the server it is on (so if its unix, remove the carriage returns). Then the user selects "ascii" ftp mode and the end-of-line gets carriage return if the client is windows and not if its unix. In my experience, all command-line/GUI ftp programs give the ascii/binary choice. The problem is probably that you want the user to download from a web page and even using the ftp://myserver.com/myfile link syntax I don't know of a way you can forceably set the ascii/binary setting (unless someone else knows different).


HTH
Chris




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to