Windows下開發驗證碼正常,部署到linux後,驗證碼失效!
1、[root@root ~]# cd fc-list
-bash: cd: fc-list: No such file or directory
2、若上面未失敗則忽略此步驟
[root@root ~]# yum -y install fontconfig
用fontconfig來安裝字體庫
.........
Downloading packages:
ttmkfdir-3.0.9-42.el7.x86_64.rpm | 48 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : ttmkfdir-3.0.9-42.el7.x86_64 1/1
Verifying : ttmkfdir-3.0.9-42.el7.x86_64 1/1
Installed:
ttmkfdir.x86_64 0:3.0.9-42.el7
Complete!
3、執行ttmkfdir命令
[root@root~]# ttmkfdir -e /usr/share/X11/fonts/encodings/encodings.dir
4、(XFTP)上傳字體到文件夾(樓主添加的是微軟雅黑,其它字體有點模糊)
4、修改字體
[root@root~]# vi /etc/fonts/fonts.conf
5、保存後執行
[root@root~]# fc-list
6、重啓系統
7、修改後
晚了,溜了,程序員早睡早起擠地鐵,哈哈。。。。