Re: ^M in PHP

From: Date: Thu, 13 Mar 2003 19:53:58 +0000
Subject: Re: ^M in PHP
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-139584@lists.php.net to get a copy of this message
Robert Cummings wrote:
I know there's a binary for doing exactly that in linux but I can't for the life of me remember the name. If you're text editor is any good you should be able to do a search and replace for "\r" with "". I use joe, but that's hardly the editor of choice for most. Cheers, Rob. Liam Gibbs wrote:
I'm downloading a file from Windows to Linux through PHP. Understandably, there are ^Ms at the end of my lines. Is there a PHP function I can use to delete them?
Its "dos2unix" and conversely "unix2dos". HTH Chris (as he edits his reply-all addresses to only go to the list :-)

« previous php.general (#139584) next »