PHP:意外的 T_LIST
我正在使用以下代码来交付和嵌入 flash 文件,我正在使用 getimagesize 来获取 swf 的宽度和高度,但它似乎不喜欢列表部分...有人知道我哪里出错了吗?
<?php include($_SERVER['DOCUMENT_ROOT']."/header.php"); ?>
<h1><?php print($_GET['tag']); ?> <a href="#rl">(Related files)</a></h1>
<hr />
<div align="center">
<?php
$project = $_GET['project'];
$file = $_GET['file'];
$tag = $_GET['tag']
list($width, $height, $type, $attr) = getimagesize("files/".$project."/".$file.".swf");
print('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'.$width.'" height="'.$height.'" id="FlashID" title="'.$tag.'">');
print('<param name="movie" value="files/'.$project.'/'.$file.'.swf" />');
print('<param name="quality" value="high" />');
print('<param name="wmode" value="opaque" />');
print('<param name="swfversion" value="6.0.65.0" />');
print('<param name="expressinstall" value="/Scripts/expressInstall.swf" />');
?>
<!--[if !IE]>-->
<?php print('<object type="application/x-shockwave-flash" data="files/'.$project.'/'.$file.'.swf" width="'.$width.'" height="'.$height.'">') ?>
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="6.0.65.0" />
<param name="expressinstall" value="/Scripts/expressInstall.swf" />
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
</div>
<?php include($_SERVER['DOCUMENT_ROOT']."/footer.php"); ?>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
<script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
I am using the following code to deliver and embed a flash file, i am using getimagesize to get the width and height of the swf but it doesn't seem to like the list part... anyone know where I'm going wrong?
<?php include($_SERVER['DOCUMENT_ROOT']."/header.php"); ?>
<h1><?php print($_GET['tag']); ?> <a href="#rl">(Related files)</a></h1>
<hr />
<div align="center">
<?php
$project = $_GET['project'];
$file = $_GET['file'];
$tag = $_GET['tag']
list($width, $height, $type, $attr) = getimagesize("files/".$project."/".$file.".swf");
print('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'.$width.'" height="'.$height.'" id="FlashID" title="'.$tag.'">');
print('<param name="movie" value="files/'.$project.'/'.$file.'.swf" />');
print('<param name="quality" value="high" />');
print('<param name="wmode" value="opaque" />');
print('<param name="swfversion" value="6.0.65.0" />');
print('<param name="expressinstall" value="/Scripts/expressInstall.swf" />');
?>
<!--[if !IE]>-->
<?php print('<object type="application/x-shockwave-flash" data="files/'.$project.'/'.$file.'.swf" width="'.$width.'" height="'.$height.'">') ?>
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="6.0.65.0" />
<param name="expressinstall" value="/Scripts/expressInstall.swf" />
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
</div>
<?php include($_SERVER['DOCUMENT_ROOT']."/footer.php"); ?>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
<script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
$tag = $_GET['tag']
需要一个 ;。实际上很容易找到,因为您只有一个
列表
。检查上面的行:繁荣你钉了它!$tag = $_GET['tag']
needs an ;.It's actually pretty easy to find, as you only have one
list
. Check the line above: boom you nailed It!