In interaction with the user, the front end of the long text in theory allows the user to use the expression, but the current end of the expression to the background interface, due to some of the data coding restrictions, there is no way to save such data.
The method I use here is to use the emoticons in the regular transformation text and then read from the database, and then do a reverse regularization.
"Note: After the success of emoticons, the pro-test in the micro-letter, browser, and mobile phone side, will automatically match the current expression character"
Put the code below
/**
* Set Long text content
*
* @param $content
* @return Mixed
*/
Public Function SetContent ($content) {
Return Preg_replace_callback ('/[\xf0-\xf7].{ 3}/', function ($r) {return ' @e '. Base64_encode ($r [0]);}, $content);
}
/**
* Get the long text content after processing
*
* @param $content
* @return Mixed
*/
Public Function GetContent ($content) {
Return Preg_replace_callback ('/@e (. { 6}==)/', function ($r) {return Base64_decode ($r [1]);}, $content);
}