我下面的代码不起作用。
nisreen
是 DB 的名称,表名是ana
。
我想要的是从数据库中读取 SWF 文件的路径,然后在网页上查看。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Untitled 1</title>
<?php
$con =mysql_connect("localhost","root","");
mysql_select_db("nisreen", $con);
$result = mysql_query("SELECT * FROM ana LIMIT 1");
while($row = mysql_fetch_array($result))
{
$row['title'];
}
echo '</head>';
echo '<body>';
echo $row;
echo '<object data="'.$row . "'";
echo "type='application/x-shockwave-flash' width='600' height='600'>";
echo '</object>';
echo '
</body>
</html>';
?>