Reply to Re: CR/LFs eaten by PHP !?

Your name:

Reply:


Posted by Oli Filth on 10/18/05 17:04

Serge Wautier wrote:
> Env.: PHP 4.4.0 / IIS 5.1 / XP Pro
>
> Hi All,
>
> I'm writing a PHP page which contains plain text.
> Oddly enough, it there is a CRLF right after a php tag, this CRLF is eaten
> and doesn't appear on the client side.
>
> e.g.:
> <?php header('Content-type: text/plain') ?>
> a:<?php whatever(); ?>
> b:123
> c:456
>
> This script appear at the client as:
> a:whateverb:123
> c:456
>
> instead of :
>
> a:whatever
> b:123
> c:456
>
> I noticed that adding a 2nd CRLF is a workaround since one CRLF then appears
> at the client side. Adding any character (such as a space) between the php
> tag and the crlf also preserves the CRLF.
> However, I'd like to understand what happens. Is there a way to tell PHP to
> preserve my CRLFs ?
>

http://www.php.net/manual/en/faq.using.php#faq.using.newlines

--
Oli

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация