Re: CR/LFs eaten by PHP !?
- From: "Oli Filth" <catch@xxxxxxxxxxxxxx>
- Date: 18 Oct 2005 07:04:34 -0700
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
.
- Follow-Ups:
- Re: CR/LFs eaten by PHP !?
- From: Serge Wautier
- Re: CR/LFs eaten by PHP !?
- References:
- CR/LFs eaten by PHP !?
- From: Serge Wautier
- CR/LFs eaten by PHP !?
- Prev by Date: CR/LFs eaten by PHP !?
- Next by Date: Re: fopen() taking ten seconds or more to come back...
- Previous by thread: CR/LFs eaten by PHP !?
- Next by thread: Re: CR/LFs eaten by PHP !?
- Index(es):
Relevant Pages
|