Re: Code spacing causing HEADER problem?

From: Date: Sat, 18 Sep 2004 03:34:34 +0000
Subject: Re: Code spacing causing HEADER problem?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-197080@lists.php.net to get a copy of this message
* Thus wrote BOOT: > I don't get this! > > Why does example (a) work for me but not example (b) ??? I realize that no > output can be sent to the browser before the header but why would code > linepace effect? Thanks for any info! > > > (a) > > <?php $a = 1; ?> > <?php header("Location: 1.php");?> > > > (b) > > <?php $a = 1; ?> > > <?php header("Location: 1.php");?> PHP is friendly only for one <CR> and nothing else try this test to see how it outputs the data: a) <?php echo 'Constant'; ?> <?php echo 'LineOfText'; ?> b) <?php echo 'NotConstant' ?> <?php echo 'LineOfText' ?> a output) ConstantLineOfText b output) NotConstant LineOfText Be sure to view source if you run it in through a web browser. Curt -- The above comments may offend you. flame at will.

« previous php.general (#197080) next »