" in the head tag of the web page; 2. Add it in ".htaccess" The default charset setting information; 3. Use the header to set the encoding information of the returned data."/> " in the head tag of the web page; 2. Add it in ".htaccess" The default charset setting information; 3. Use the header to set the encoding information of the returned data.">

Home  >  Article  >  Backend Development  >  What to do if php ie is garbled?

What to do if php ie is garbled?

藏色散人
藏色散人Original
2022-10-21 09:59:441287browse

php IE garbled solution: 1. Set "f860775cd95e67ed8e16c79e5aa8ad2f" in the head tag of the web page; 2 . Add the default charset setting information in ".htaccess"; 3. Use the header to set the encoding information of the returned data.

What to do if php ie is garbled?

The operating environment of this tutorial: Windows 7 system, PHP version 8.1, Dell G3 computer.

What should I do if php ie is garbled?

1. Set

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

in the head tag of your webpage. This sentence is the gb2312 encoding

but when I use IE, it automatically selects it. UTF-8, use ff to automatically select gb2312

2. Confirm what the default charset is under Apache, it may conflict with your web page.

Set the encoding of the returned information on the server side:

  • Use .htaccess to add the default charset setting information

  • In PHP, use header to set the encoding information of the returned data

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What to do if php ie 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