No micro-channel public process to develop micro-letter nickname problems with pictures

One,

preg_match('/[\x{4e00}-\x{9fa5}A-Za-z0-9_]+/u', $userInfo['nickname'],$matches) 

$userInfo['nickname'] = implode('',$matches);

Note: This method will remove the nickname in the rest of the image will remain

two,

   base64_encode (coding)

base64_decode (decoding) 
Note: When stored in the database encoding, decoding (the perfect solution) while reading

Guess you like

Origin www.cnblogs.com/blange/p/11387128.html