Home  >  Article  >  Backend Development  >  How to solve the Chinese garbled problem of flex php

How to solve the Chinese garbled problem of flex php

藏色散人
藏色散人Original
2021-09-20 10:01:441749browse

flex PHP Chinese garbled solution: 1. Add "header("Content-Type:text/html;charset=utf-8");" to the PHP header; 2. Change zend-studio's File encoding format.

How to solve the Chinese garbled problem of flex php

#The operating environment of this article: Windows7 system, PHP7.1, Dell G3 computer.

How to solve the Chinese garbled problem of flex php?

PHP and flex interact with garbled characters

There are several reasons for this:

First, the content in php is not encoded in utf-8. You can add it to the php header: header("Content-Type: text/html;charset=utf-8");

Second, the php file itself is not utf-8 encoded. This can change the file encoding format of zend-studio. The method to specify utf-8 is: windw->preference->General->Workspace-> ;Text file encoding, select utf-8.

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to solve the Chinese garbled problem of flex php. 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