大家好我有一个问题,我需要大家帮忙解决这个问题。我想做这样的事情http://acidch.at/multipr2.php。但是,我想将设计更改为我自己的方法并将其应用于以下内容:http://jsfiddle.net/yvasj8eq/3/。这是上面链接的网站的PHP脚本
<?php
function pr2_embed ($width, $height) {
$w = (string) (int) $width;
$h = (string) (int) $height;
return <<<HTMLcode_end
<embed width="$w" height="$h" base="http://external.kongregate-games.com/gamez/0001/0110/live/" src="http://external.kongregate-games.com/gamez/0001/0110/live/embeddable_10110.swf" type="application/x-shockwave-flash"></embed>
HTMLcode_end;
}
function get_value ($name, $default) {
if (!isset($_REQUEST[$name])) return $default;
return $_REQUEST[$name];
}
function create_page () {
$rows = get_value("rows", 1);
$cols = get_value("cols", 1);
$width = get_value("width", 770);
$height = get_value("height", 560);
if ($width <= 0) $width = 770;
if ($height <= 0) $height = 560;
if ($rows <= 0) $rows = 1;
if ($cols <= 0) $cols = 1;
$i1 = (int) $rows;
$i2 = (int) $cols;
$display = pr2_embed($width, $height);
$result = "";
while ($i2) {
for ($instance = 0; $instance < $i1; $instance ++)
$result .= $display;
$result .= '<br />';
$i2 --;
}
return <<<HTMLcode_end
<html>
<head>
<title>Many PR2s!</title>
<head>
<body>$result</body>
</html>
HTMLcode_end;
}
echo create_page ();
?>
PHP脚本中列出了“multiple pr2”的嵌入代码。但这是“Xat Chat”的嵌入代码:`
<embed src="http://www.xatech.com/web_gear/chat/chat.swf" quality="high" bgcolor="#000000" width="540" height="405" name="chat" FlashVars="id=1&gn=Lobby" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://xat.com/update_flash.shtml" /><br><small><a target="_BLANK" href="http://xat.com/web_gear/chat/embed.php?id=1&GroupName=Lobby">Get Lobby chat group</a> | <a target="_BLANK" href="http://xat.com/Lobby"> Goto Lobby website</a></small><br>`
我希望新设计就像我上面发布的jsfiddle一样。 xat聊天将在multipr2的正下方,并且将远离约2&lt; p>也许。我想知道我是否可以让用户能够排除或包含xat聊天,例如是否愿意下载。谢谢!