exeSql($s"/> exeSql($s">

Home  >  Article  >  Backend Development  >  关于从数据库中查询出的字符串显示在网页下是乱码的有关问题

关于从数据库中查询出的字符串显示在网页下是乱码的有关问题

WBOY
WBOYOriginal
2016-06-13 13:17:53821browse

关于从数据库中查询出的字符串显示在网页上是乱码的问题
MYSQL数据库,从其中查出来的数据用echo输出到网页上是乱码,而且奇怪的是只有局部一个地方是乱码,其它地方却显示正常。

$sql="select username from pw_members where uid=?";
$result=$handler->exeSql($sql,array($winduid),"select");
if($result){
echo '

'.$result["username"].'
' }else{
echo '
未知用户名
';
}

这是代码,然后网页开头是

鏁版嵁搴撲俊鎭
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn