"."/> ".">

Home >Backend Development >PHP Problem >What should I do if the php template class is garbled?

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

藏色散人
藏色散人Original
2021-12-16 09:49:541602browse

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

<meta charset = "utf-8" /><meta charset = "GBK" />  <meta charset = "gb2312" />

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 锛

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!

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