专注ECSHOP第九年
始自2007,服务二千多商户,不断为您增光溢彩

过滤微信昵称中的表情

function filterNickname($nickname)
{
    $nickname = preg_replace('/[\x{1F600}-\x{1F64F}]/u', '', $nickname);
    $nickname = preg_replace('/[\x{1F300}-\x{1F5FF}]/u', '', $nickname);
    $nickname = preg_replace('/[\x{1F680}-\x{1F6FF}]/u', '', $nickname);
    $nickname = preg_replace('/[\x{2600}-\x{26FF}]/u', '', $nickname);
    $nickname = preg_replace('/[\x{2700}-\x{27BF}]/u', '', $nickname);
    $nickname = str_replace(array('"','\''), '', $nickname);
    return addslashes(trim($nickname));
}

过滤微信昵称中的表情 ,不过滤 HTML 符号。常用方法

未经允许不得转载:阿牛ECSHOP » 过滤微信昵称中的表情
1

Parse error: syntax error, unexpected '}' in /www/wwwroot/blog2018.uuecs.com/wp-content/themes/DUX/comments.php on line 31