Home > Article > Backend Development > How to solve php eclipse garbled problem
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.
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
<?php ini_set('default_charset','utf-8') ?>
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!