Get WeChat nickname and store it in mysql, based on the function base64_encode under php5.6, and support emoji implementation
1. Based on the authorization of WeChat webpage, the nickname obtained: 🌵yangqin🍬✨, as shown in Figure 1:
2. The relevant information of WeChat users obtained, as shown in Figure 2:
3. The first solution, in order to make mysql support the storage of letters, modify the collation as: utf8mb4_general_ci, as shown in Figure 3:

The first solution, in order to make mysql support store letters, modify the collation to: utf8mb4_general_ci
4. The execution of the sql statement is successful, as shown in Figure 4:
5. It turns out that the data stored in mysql is not perfect for emoji, as shown in Figure 5:
6. It is finally decided whether the sorting rule is restored to: utf8_general_ci, and the nickname is encoded based on the php function base64_encode, as shown in Figure 6:

The final decision of the collation is decided or restored to: utf8_general_ci, the nickname is encoded based on the php function base64_encode
7. The nickname data stored in mysql after encoding is: 8j+mtxlhbmdxaw7wn42s4pyo, as shown in Figure 7:
8. If you need to display a WeChat nickname on the web page, you need to use base64_decode to decode, as shown in Figure 8:
9. Display WeChat nickname on the webpage: 🌵yangqin🍬✨, support emoji, as shown in Figure 9:






