使Typecho支持Emoji表情

首页 / ?Typecho / 正文

前言

在我们写文章时,经常会想用一些Emoji表情,但是Typecho本身不支持Emoji表情,那么怎么办呢?马上教你!

教程

1、进入数据库执行以下语句

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;

2、网站根目录数据库配置文件config.inc.php

'charset' => 'utf8mb4',  // 将原来的utf8修改为 utf8mb4
评论区
头像