<?php
header("Content-Type: text/html; charset=UTF-8");
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<?php
$conn=@mysql_connect("localhost","root","") or die("数据库连接失败!");
mysql_select_db("student_sys",$conn);
mysql_query("set names utf-8");
$query=mysql_query("select * from user_login");
$row=mysql_fetch_array($query);
echo $row['admin_loginname'];
?>
</body>
</html>mysql数据库编码为utf8_general_ci格式读取mysql中文汉字时出现一串问号(????????.......)请高手帮忙,谢谢!
解决方案 »
- php include 错误
- 请人帮忙修改PHP程序,解决一下PHP搜索引擎的问题
- 如何把同一表单中的内容提交到两个不同的页面中?
- <?php #[abc] ;....... ?>
- Fatal error: Call to undefined function: pg_connect() in C:\www\battery\include\config.php on line 9
- 急问,在线等
- iWPC2.2网站内容发布系统发布,试用版下载
- 国庆php版大聚会,欢迎所有喜欢php的gg/mm参加!!!!!!!!!
- php对mysql的调用?
- php如何查询数据库一个字段值并赋值给一个变量
- PHP通过openssl创建密钥
- php调用com组件问题
mysql_query("set names 'utf8'");