截图发现出现的问题是一堆小方块。
这里其实显而易见的就是中文乱码。
出现这个问题就是因为服务器没有安装中文字体,所以无法解析。
所以只需要在服务器上安装上对应的中文字体就可以了,
首先从本地Windows (C:\Windows\Fonts ) 上随便找一个中文字体。
然后上传到服务器的/usr/share/fonts文件夹中,之后输入
fc-cache -fv
root@:/usr/share/fonts# fc-cache -fv
/usr/share/fonts: caching, new cache contents: 8 fonts, 1 dirs
/usr/share/fonts/truetype: caching, new cache contents: 0 fonts, 2 dirs
/usr/share/fonts/truetype/dejavu: caching, new cache contents: 6 fonts, 0 dirs
/usr/share/fonts/truetype/lato: caching, new cache contents: 18 fonts, 0 dirs
/usr/local/share/fonts: caching, new cache contents: 0 fonts, 0 dirs
/root/.local/share/fonts: skipping, no such directory
/root/.fonts: skipping, no such directory
/usr/share/fonts/truetype: skipping, looped directory detected
/usr/share/fonts/truetype/dejavu: skipping, looped directory detected
/usr/share/fonts/truetype/lato: skipping, looped directory detected
/var/cache/fontconfig: cleaning cache directory
/var/cache/fontconfig: invalid cache file: 3830d5c3ddfd5cd38a049b759396e72e-le64.cache-7
/root/.cache/fontconfig: not cleaning non-existent cache directory
/root/.fontconfig: not cleaning non-existent cache directory
fc-cache: succeeded
即可