Posted by Rasmus Lerdorf on 10/11/02 11:27
Graham Anderson wrote:
> <?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'); //took out a space
> header ("Content-Length: ".strlen($xml)); // added a space
> echo $xml;
> ?>
Wow, that is nasty. There is probably a syntax error in there. Use a
heredoc in cases like this. Something like this:
$xml = <<< EOB
<?xml version="1.0"?>
<?quicktime type=...
....
EOB;
Much less likely to make mistakes this way since you don't need to
escape anything (except $) and you can still use variables in the block
of text.
-Rasmus
Navigation:
[Reply to this message]
|