PHP建立聊天室的时候语言显示不出来

来源:百度知道 编辑:UC知道 时间:2024/05/15 04:03:28
这是view.php文件的源代码.请高手指点
<?php
include("connect.php");

$sql="select * from chatroom";
$sql.="where place='".$_REQUEST['place']."'";
$sql.="order by mtime desc limit 0,20";
$result=mysql_query($sql);

?>
<html>
<head>
<meta http-equiv="refresh"content="5"url=view.php? place=<?php echo $_REQUEST['place'];?>">
<title>我的聊天室</title>
</head>

<body bgcolor="#8080c8">

<h2 align="center">我的聊天室</h2>

<hr>
<?php
if($result)
{
?>
<table border="0">
<?php
while($myarray=mysql_fetch_array($result))

{
?>
<tr>
<td valign=&qu

发送聊天内容的页面和显示聊天内容的页面要使用相同的语言,也就是说在html的<head></head>之间都要有
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">,当然,这里举例用了“gb2312”,你也可以改成你需要的,如“utf-8”。

$myarray["name"]
改为$myarray[name]