EPP debugging garbled solution

Source: Internet
Author: User
The EPP debugging garbled text followed the PHP video to write a garbled text, and the MYSQL database garbled text was done. However, during EPP debugging, Chinese characters are garbled (UTF8 is used for my files ), if you use Firefox, you only need to set up the UTF-8, but the EPP debugging does not know where to set & lt ;? $ Conn = @ mysql_connect (& qu EPP debugging garbled
I followed the PHP video to write a piece of garbled code. MYSQL database garbled code was done, but when I used EPP for debugging, the Chinese text displayed was garbled (I used UTF8 for files and so on ), if you use Firefox, you only need to set the UTF-8, but you do not know where to set the EPP when debugging


$ Conn = @ mysql_connect ("localhost", "root", "") or die ("connection error ");
Mysql_select_db ("test", $ conn );

If ($ _ POST ['submit ']) {
Mysql_query ("set names utf8 ");
$ SQL = "insert into message (id, user, title, content, lastdate )".
"Values ('', '$ _ POST [user]', '$ _ POST [title]', '$ _ POST [content]', now ())";


Mysql_query ($ SQL, $ conn );
}
?>




"User", "title", and "content" are garbled during EPP debugging.




------ Solution --------------------
Your program file is not saved in UTF-8 encoding.
------ Solution --------------------
The encoding is inconsistent !~~ Check the local code !~~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.