How to solve php eclipse garbled problem

藏色散人
Release: 2023-03-02 20:16:02
Original
1923 people have browsed it

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

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

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!