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

What to do if php eclipse is garbled

藏色散人
藏色散人Original
2020-07-23 10:31:062797browse

php The solution to eclipse garbled characters: first find and open the "eclipse.ini" file; then add "-Dfile.encoding=UTF-8" at the end of the file; and finally restart eclipse.

What to do if php eclipse is garbled

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.

Recommended: "PHP Tutorial"

Method 2:

windows->preferences->general Open click workspace and it will appear on the right. Text file encoding is the text encoding default cp1252. Click other drop-down menu and select UTF-8. Select to compile the program.

Method 3:

Insert

<?php ini_set(&#39;default_charset&#39;,&#39;utf-8&#39;) ?>

Method 4 in the PHP page:

Modify the database configuration file my.ini,

Change gbk to utf8

Method 5:

mysql_query("set names utf8");//指定字符编码【注意这里需要指定字符编码,不然数据库里可能是乱码】

Related introduction:

Eclipse itself is just a framework platform, but the support of many plug-ins allows Eclipse to have flexibility that is difficult to have with other IDE software with relatively fixed functions. Many software developers develop their own IDEs using Eclipse as the framework.

Eclipse was originally developed by IBM as a next-generation IDE development environment to replace the commercial software Visual Age for Java. It was contributed to the open source community in November 2001. It is now supported by the Eclipse Foundation, a non-profit software vendor alliance ( Eclipse Foundation) management. In 2003, Eclipse 3.0 selected the OSGi service platform specification as the runtime architecture. In June 2007, stable version 3.3 was released. Version 3.4, codenamed Ganymede, was released in June 2008.

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