麻烦各位高手一定帮忙看看 很急得 非常感谢 分不是问题
refresh.php的内容
<?php
include_once("connect.php");
$link=@mysql_pconnect($host,$loginname,$password) or exit();
mysql_select_db("user",$link);
$query = "select * from studentmsg";
$result = mysql_query($query);
while ($array = mysql_fetch_array($result) )
{
$chat_user=$array["name"];
$time = $array["in_time"];
$color = $array["color"];
$to=$array["sto"];
$message = $array["message"];
$theendmsg= "<font color=\"#9999CC\">$time</font><font color=\"#FF6699\">$chat_user</a>:</font>对<font color=\"#cc6699\"> $to </a></font> 说 <font color=$color>$message</font><br>";
}
echo "<meta http-equiv=\"Refresh\" content=\"5\">";
echo "\n<script language=\"javascript\">\n";
echo "parent.document.all.txt.innerHTML += "<br/>"".$theendmsg."';\n";
echo "</script>\n";
mysql_free_result($result);
mysql_close($link);
?>
数据库里面肯定有东西 因为我察看了
然后在student_view里面我使用以下的代码
<meta content="text/html; charset=gb2312" http-equiv=Content-Type>
<link href=style.css rel=stylesheet>
<head>
<span id=txt></span><br>
<iframe border=0 frameborder=0 width=0 src=refresh.php></iframe>
</head>
<body>
</body>
</html>
为什么就是都不出来数据????????
为什么??
谢谢啦
要多少分就给多少