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 (& quot; localhost & quot;, & quot; root & quot;, & quot; EPP debugging garbled characters
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 !~~