|
我在数据库里面用select表的话,可以看到数据库里面是中文的,可是,我用以下php查询的时候就有问题哦:
<?php
$dbhost="localhost";
$dbuser="root";
$dbpwd="";
$dbname="asp";
mysql_pconnect($dbhost,$dbuser,$dbpwd) or die("不能连接服务器!");
mysql_select_db("$dbname") or die("不能选择数据库");
function qmxsql($sql){
$xydwdb=mysql_query ($sql);
$array = mysql_fetch_array($xydwdb);
return $array;
}
$yzus=qmxsql("select * from urlwords01 limit 0,5;");
foreach($yzus as $content) {
$re.="$content\n";
}
$content=$re;
include_once "rss_read.htm";
?>
rss_read.htm内容:
<!--
<?php
print <<<qmx_end
-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=utf8">
<title>ASPseek</TITLE>
</HEAD>
<BODY BGcolor="#FFFFFF">
<table width="650" border="0" cellspacing="1" cellpadding="2" bgcolor="#dcdcdc" align="center">
<tr>
<td bgcolor="whitesmoke" colspan="2">
<p><b>{$name}</b> 发布于 :{$date}</p>
</td>
</tr>
<tr>
<td bgcolor="#ffffff" colspan="2">
<font color="green"><a href="{$link}">{$link}</a></font><br><br>
<p>{$content}</p><br>
<!--{comments}: {nrc}<br>{send}-->
</td>
</tr>
</table>
<br>
</BODY>
</HTML>
<!--
qmx_end;
print <<<qmx_end
-->
<!--
xydw_end;
?>
-->
帮我! |
|