Home > php教程 > php手册 > 解决MySQL中文输出变成问号的问题

解决MySQL中文输出变成问号的问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 12:28:10
Original
773 people have browsed it

    于是我在程序中加入:mysql_query("SET NAMES GB2312");问题迎刃而解。主要是一个编码问题。

    注意这句代码的插入位置,应该插入在显示数据的代码前,否则就没有意义了。具体可以参照上次我放出的PHP显示MySQL数据的程序。

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template