Home > Backend Development > PHP Tutorial > 求教一个乱码的有关问题

求教一个乱码的有关问题

WBOY
Release: 2016-06-13 13:10:12
Original
746 people have browsed it

求教一个乱码的问题
存储过程:
CREATE DEFINER=`dbmaster`@`%` PROCEDURE `proc_photo_album_add`(
in type_id int(10),
in t_id int(10),
in us_id int(10),
in ctime int(10),
in album_title varchar(30) character set utf8,
in maxnum int(10)
)

php:
$this->db->query('SET NAMES utf8');

还是乱码。

数据库中已经是中文了,查询出来是乱码。求经验丰富的解惑

------解决方案--------------------
查询出来的时候
header("Content-type: text/html; charset=utf-8");

文件编码也保存成utf-8

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template