Look at the code
The browser will show garbled, perhaps you will say my file is not utf-8 encoding.
Attached file link, click to download
http://server835.qiniudn.com/mysql.php
I use notepad++ to open the display is Utf-8 no BOM encoding. The local environment is WAMP. That database address I write casually, does not exist. After downloading, you can directly run on your own computer to see garbled.
Reply content:
Look at the code
The browser will show garbled, perhaps you will say my file is not utf-8 encoding.
Attached file link, click to download
http://server835.qiniudn.com/mysql.php
I use notepad++ to open the display is Utf-8 no BOM encoding. The local environment is WAMP. That database address I write casually, does not exist. After downloading, you can directly run on your own computer to see garbled.
After the successful connection to MySQL, always execute the following code:
mysql_query('set names utf8');
Where UTF8 encoding can be modified to the encoding you want
In principle, the source code file encoding to be consistent with the database encoding file
Just downloaded the file, found that it is not utf8, you can use EditPlus to convert