1.显示乱码
解决:
-
在PHP脚本开头添加以下代码:
header('Content-type: text/html; charset=utf-8');
2.PDO连接失败:
PDO('先要有sqlite:')
3.php标签开头必须顶格![](https://i-blog.csdnimg.cn/blog_migrate/08e4d0bc78faa94fd63bd850ef0b9166.png)
4.字符集不兼容 SQLSTATE[HY000][2054] Server sent charset unknown to the client.Please,report to the developers
尝试降低mysql版本
mysqld -remove
mysqld -install
mysqld --initialize