You are here: Re: [PHP] Problems with headers « PHP « IT news, forums, messages
Re: [PHP] Problems with headers

Posted by David Robley on 10/05/37 11:27

Graham Anderson wrote:

> I checked that too :(
> No spaces in the <?php line
> I am running PHP Version 4.4.0
>
> Out of curiosity, I removed the line:
> $xml .= '<?quicktime type="application/x-qtskin"?>'."\n";
> and got the same error message
>
> Is this one of those situations for ob_start ?
> Kind of bizarre to my Newbie mind
>
> <?php
> $quote = "\"";
> $xml = '';
> $xml .= '<?xml version="1.0"?>'."\n";
> $xml .= '<?quicktime type="application/x-qtskin"?>'."\n";
> $xml .= '<skin>'."\n";
> $xml .= '<movie src=' . $quote. "../../fonovisa.mov" . $quote.
> '/>'."\n";
> $xml .= '<contentregion src=' .$quote. "../images/mask.gif" .
> $quote. '/>'."\n";
> $xml .= '<dragregion src=' . $quote. "../images/drag.gif" . $quote.
> '/>'."\n";
> $xml .= '</skin>';
> header('Content-Type: video/quicktime');
> header ("Content-Length: ".strlen($xml));
> echo $xml;
> ?>
>
>
> I am still getting the :
>>> <b>Warning</b>: Cannot modify header information - headers already
>>> sent by (output started at
>>> /home/www/siren/siren/fonovisa/skintest/Library/php/
>>> fonovisa_simple.php:1) in
>>> <b>/home/www/siren/siren/fonovisa/skintest/Library/php/
>>> fonovisa_simple.php</b> on line <b>12</b><br />

Actually, I think it might be something quite unexpected. Try commenting out
the two calls to header, then run the script and do a 'view source'. My
guess is there is a syntax error message being output which will of course
cause header to bleat. My second guess is that the syntax error will be
caused by line 2 (but won't appear in that line)

$quote = "\"";

which may not be doing what you hope it is. The solution for this is left as
an exercise for the student :-)

Cheers
--
David Robley

The most expensive component is the one that breaks.

 

Navigation:

[Reply to this 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

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