How to solve the garbled problem of php 5.5

藏色散人
Release: 2023-03-15 06:14:01
Original
1627 people have browsed it

Solution to php5.5 garbled code: 1. HTML page setting ""; 2. PHP page setting "header('content-type:text/html ; charset=utf-8');".

How to solve the garbled problem of php 5.5

The operating environment of this article: Windows7 system, php5.5 version, DELL G3 computer

How to solve the problem of php 5.5 garbled codequestion?

Ensure that the same encoding is guaranteed in all places, if they are all utf-8

1, html5 page:

2. PHP page: header('content-type:text/html; charset=utf-8');

3. Database: mysql_query('set names utf8');

Recommended learning: "PHP video tutorial"

The above is the detailed content of How to solve the garbled problem of php 5.5. For more information, please follow other related articles on the PHP Chinese website!

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