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

Home >Backend Development >PHP Problem >How to solve the garbled problem of php 5.5

How to solve the garbled problem of php 5.5

藏色散人
藏色散人Original
2022-01-26 09:37:081661browse

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!

Statement:
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