Home >Backend Development >PHP Tutorial >javascript - I'm new to php and have garbled code problems.

javascript - I'm new to php and have garbled code problems.

WBOY
WBOYOriginal
2016-08-08 09:06:48891browse

In the article publishing system, when I submit the form, a prompt will be alerted after the submission is successful, but the Chinese characters will appear garbled.
I found some information online and there are three places where you should pay attention to character encoding.
One: header
Two: Database character encoding
Three: File saving encoding
After setting them all, it still doesn’t work.

demo:
http://www.mrchen573.com/php_...

javascript - I'm new to php and have garbled code problems.
javascript - I'm new to php and have garbled code problems.

javascript - I'm new to php and have garbled code problems.

javascript - I'm new to php and have garbled code problems.

Reply content:

In the article publishing system, when I submit the form, a prompt will be alerted after the submission is successful, but the Chinese characters will appear garbled.
I found some information online and there are three places where you should pay attention to character encoding.
One: Header
Two: Database character encoding
Three: File saving encoding
After setting them all, it still doesn’t work.

demo:
http://www.mrchen573.com/php_...

javascript - I'm new to php and have garbled code problems.
javascript - I'm new to php and have garbled code problems.

javascript - I'm new to php and have garbled code problems.

javascript - I'm new to php and have garbled code problems.

The poster directly echoes a Chinese text and reads it without using the scripttag

**Add another sentence above this echo
echo ""**

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