"."> What should I do if the php template class is garbled?-PHP Problem-php.cn

What should I do if the php template class is garbled?

藏色散人
Release: 2023-03-14 13:38:02
Original
1482 people have browsed it

Solution to garbled characters in the php template class: 1. Check the PHP file that references the template; 2. Set the file encoding to be consistent with the file encoding of the html template, and modify the code such as " ".

What should I do if the php template class is garbled?

#The operating environment of this article: Windows 7 system, PHP version 7.4, Dell G3 computer.

What should I do if the php template class is garbled?

PHP template garbled problem:

## Description of the problem

There is a garbled problem with an html template page in both Chinese and English:

Modifications in the content template to the following three types do not take effect

 
Copy after login

Modification The file encoding formats utf-8, GB2312, and unicode also do not take effect.

Problem Solution

Check the PHP file that references the template to see if it is the same as the file encoding of the html template

The file encoding refers to :

What should I do if the php template class is garbled?

What I used is to change the php (GBK) file encoding to (UTF-8), and then change the file encoding of the template file to (UTF-8)

Then Change the template file to the following:

Copy after login

Recommended learning: "

PHP Video Tutorial"

The above is the detailed content of What should I do if the php template class is garbled?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
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
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!