|
Posted by Serge Wautier on 10/18/05 16:52
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 ?
TIA,
Serge
serge at wautier dot net
http://www.apptranslator.com
Navigation:
[Reply to this message]
|