分类 柯基 下的文章

选择自己的数据库->操作->排序规则:“utf8mb4_general_ci”->执行

get-emoji-1.png

在数据库SQL中执行以下代码:

alter table typecho_comments convert to character set utf8mb4 collate utf8mb4_general_ci;
alter table typecho_contents convert to character set utf8mb4 collate utf8mb4_general_ci;
alter table typecho_fields convert to character set utf8mb4 collate utf8mb4_general_ci;
alter table typecho_metas convert to character set utf8mb4 collate utf8mb4_general_ci;
alter table typecho_options convert to character set utf8mb4 collate utf8mb4_general_ci;
alter table typecho_relationships convert to character set utf8mb4 collate utf8mb4_general_ci;
alter table typecho_users convert to character set utf8mb4 collate utf8mb4_general_ci;

get-emoji-2.png

修改typecho的配置文件config.inc.php'charset' => 'utf8',改为'charset' => 'utf8mb4',

get-emoji-3.png

大功告成,测试下效果