Mysql和网页显示乱码解决方法集锦
将数据插入到php?name=%CA%FD%BE%DD%BF%E2" onclick="tagshow(event)" class="t_tag">数据库的时候显示乱码及从php?name=%CA%FD%BE%DD%BF%E2" onclick="tagshow(event)" class="t_tag">数据库读取出来的数据在网页上显示为乱码的问题,其实就是做到php?name=%CA%FD%BE%DD%BF%E2" onclick="tagshow(event)" class="t_tag">数据库编码,网页编码及表的编码一致)!GBK2312与下同理
(1)设置数据库编码, 为了与国际接轨,一般都设置成utf-8
(2)数据表的设置,也设置成utf-8
(3)把你的网页编码也设置成utf-8,打开Dreamweaver,(修改)--(页面属性)
(4)在你的PHP文件的第一行加上 header("Content-Type: text/html; charset=utf-8");
(5)在对数据进行操作之前应该先进行mysql_query('set names utf8');操作,然后再执行对数据的查询,更新,插入等

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 English version
Recommended: Win version, supports code prompts!

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function
