Re: \n outputs \r\n ??

From: Date: Fri, 30 May 2003 19:17:55 +0000
Subject: Re: \n outputs \r\n ??
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-149590@lists.php.net to get a copy of this message
Thanks for the promp replies to my message. After a bit of testing, running command line, and doing some debugging, I found that it was an ftp statement that was causing the problem. It was sending the file I was creating (which was correct) in ASCII format and this was changing the LF to CRLF. It took a bit to track this down. Thanks for the assistance. Michael "Michael Isaacs" <news@isaacsonline.org> wrote in message news:20030529183818.49846.qmail@pb1.pair.com... > Still new to PHP - any assistance would be very much appreciated... > > I am using a php script to send info to a local file for mail filtering. > Whe the php script sends the following: > > fputs($nf, "MAILDIR=$MAILDIR # Default mail directory\n"); > > the output actually has a chr 13, 10 > > ProcMail interprest the CR as a part of the phrase it is using for parsing, > so when it goes to send a filter out to a folder (testing in my case) it > appends a CR to the end of it, which goofs up the user mail agent. It also > goofs up the filter itself, as it is looking for a CR in the criteria. > > Is there a way to force it to only output a LF, not CRLF? Configuration > issue? > > Michael Isaacs > >

« previous php.general (#149590) next »