Re: Strange issues with header output

From: Date: Wed, 22 Dec 2004 23:02:54 +0000
Subject: Re: Strange issues with header output
Groups: php.general 
Request: Send a blank email to php-general+get-205014@lists.php.net to get a copy of this message
> From: <daniel@electroteque.org> > Hi there, I have been building a player script which outputs a windows > media asx playlist with theheader output type of video-ms-wmv. I have experienced some wierd > issues > when i use ifstatements at certain points with the header tag enclosed within it, i get > unexpected results on themac plugin. "Playlist format is unrecognised" Ie > > if ($_SESSION['referer_checked']) { > > header(aplicationtype ...); > echo $asx_playtlist here > } > > Is there somehow that an if statement is adding stuff to the header when > it shouldnt be ? An IF statement isn't going to affect headers. There must be something else in your code doing the damage. Start printing things out or logging values to a file so you can track what's going on and what changes there are. The only way an IF could affect something is if you mistakenly put if($somevar = 'somevalue') which is an _assignment_ instead of an _equality_ check and always comes out true. Then if you used "$somevar" somewhere it's value may be messed up and corrupt your file or headers. ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html

« previous php.general (#205014) next »