Home  >  Article  >  Backend Development  >  How to solve php eclipse garbled problem

How to solve php eclipse garbled problem

藏色散人
藏色散人Original
2020-07-22 09:15:051820browse

php eclipse garbled solution: first find and open the "eclipse.ini" file in the eclipse directory; then add the statement "-Dfile.encoding=UTF-8" at the end of the file; finally restart eclipse That’s it.

How to solve php eclipse garbled problem

php-eclipse garbled processing

Method 1:

1) Set the "eclipse directory Download the eclipse.ini file"

2) Add "-Dfile.encoding=UTF-8" at the end of the file.

3) Restart eclipse and the prompt will be normal.

Method 2:

windows->preferences->general Open click workspace. At this time, text file encoding appears on the right, which is the text encoding default cp1252. Click other drop-down menu and select UTF-8. Select that. Compilable program

Method three:

Insert

in the PHP pageMethod four:

Modify the database configuration file my.ini,

Change gbk to utf8

Method five:

mysql_query("set names utf8");//Specify the character encoding [Note that the character encoding needs to be specified here, otherwise it will be stored in the database It may be garbled]

Recommended: "PHP Tutorial"

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