Garbled characters appear when running php

王林
Release: 2023-04-07 14:38:01
Original
3526 people have browsed it

Garbled characters appear when running php

Garbled characters appear when running the php file

##1. Character set of the PHP editor

Take Zend Studio as an editor for PHP programs as an example. When creating a project, set the character set to "UTF-8".


2. The predefined character set used by the web page

Add before the .php file or .html file to be run Predefined statements for the character set of the web page


<meta http-equiv="Content-type"  Content="text/html;charset=UTF-8;" />
Copy after login

3. View the character set of the web page using the browser

Use the firefox browser as For example, after completing settings one and two, run the .php program. If garbled characters still appear, click the browser option bar "View" > Change encoding > UTF-8

Recommended tutorial:

PHP video tutorial

The above is the detailed content of Garbled characters appear when running php. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!