Re: New line characters and carriage returns

From: Date: Fri, 24 Oct 2003 17:00:35 +0000
Subject: Re: New line characters and carriage returns
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-167454@lists.php.net to get a copy of this message
ok, I see, I have to use double quotes around it... why is that? On Fri, 2003-10-24 at 11:57, Jonathan Villa wrote: > Ok, don't know what I am doing wrong here...but for some reason I cannot > get new line or carriage return characters to work correctly... > > For example, > > When I send some emails, I try > > $msg .= "From: me@mydomain.com\r\n > Content-Type: text/plain\r\n" > > And it doesn't work correctly... the Content Type shows in my mail > body.... > > > More importantly, I'm trying to write a system logger > > $fileName = 'errors.'.date('dmY').'.log'; > $error = date('h:i:s').' '.$script.' > '.$error.'\n'; > error_log ($error, 3, '/var/www/killerspin/logs/'.$fileName); > > but the output into my log file shows the \n but does not use it.

« previous php.general (#167454) next »