Re: What's my problem with nl2br and a text file?

From: Date: Mon, 10 Sep 2001 01:28:50 +0000
Subject: Re: What's my problem with nl2br and a text file?
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-9278@lists.php.net to get a copy of this message
Yes! I've got this exact same problem I think it has something to do with the format of a text file not recording file break positions But that doesn't really explain why notepad can display them perfect :( "John Asendorf" <JAsendorf@lcounty.com> wrote in message news:24F4A402A861D5118A1A00B0D022037430D361@exchange.lcounty.com... > Why am I having such a hard time with this code? > > > $doc = "doc.txt"; > $text = nl2br ( readfile ("D:\\foob\\bar\\foo\\$doc" ) ); > echo $text; > > OR > > $doc = "doc.txt > $text = readfile ( "D:\\foob\\bar\\foo\\$doc" ); > $text = nl2br ( $text ); > echo $text; > > > NEITHER of these give me any breaks... I'm at my wits end here. This seems > like a no brainer... I get the text file without any problem, but there are > no breaks in what is echoed. Anyone? > > PHP 4.0.7-dev from php4win > > --------------------- > John Asendorf - jasendorf@lcounty.com > Web Applications Developer > http://www.lcounty.com - NEW FEATURES ADDED DAILY! > Licking County, Ohio, USA > 740-349-3631 > Aliquando et insanire iucundum est >

« previous php.windows (#9278) next »